Spaces:
Sleeping
Sleeping
Create logic.py
Browse files
logic.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import UdopProcessor, UdopForConditionalGeneration
|
2 |
+
|
3 |
+
|
4 |
+
def load_Model():
|
5 |
+
repo_id = "microsoft/udop-large"
|
6 |
+
processor = UdopProcessor.from_pretrained(repo_id)
|
7 |
+
model = UdopForConditionalGeneration.from_pretrained(repo_id)
|
8 |
+
|
9 |
+
return model, processor
|
10 |
+
|