Spaces:
Runtime error
Runtime error
Update space for latest optimum release
Browse files- export.py +4 -0
- requirements.txt +2 -2
export.py
CHANGED
@@ -52,6 +52,10 @@ def convert_openvino(model_id: str, task: str, folder: str) -> List:
|
|
52 |
task = _TASK_ALIASES.get(task, task)
|
53 |
if task not in _HEAD_TO_AUTOMODELS:
|
54 |
raise ValueError(f"The task '{task}' is not supported, only {_HEAD_TO_AUTOMODELS.keys()} tasks are supported")
|
|
|
|
|
|
|
|
|
55 |
auto_model_class = eval(_HEAD_TO_AUTOMODELS[task])
|
56 |
ov_model = auto_model_class.from_pretrained(model_id, export=True)
|
57 |
ov_model.save_pretrained(folder)
|
|
|
52 |
task = _TASK_ALIASES.get(task, task)
|
53 |
if task not in _HEAD_TO_AUTOMODELS:
|
54 |
raise ValueError(f"The task '{task}' is not supported, only {_HEAD_TO_AUTOMODELS.keys()} tasks are supported")
|
55 |
+
|
56 |
+
if task == "text2text-generation":
|
57 |
+
raise ValueError("Export of Seq2Seq models is currently disabled.")
|
58 |
+
|
59 |
auto_model_class = eval(_HEAD_TO_AUTOMODELS[task])
|
60 |
ov_model = auto_model_class.from_pretrained(model_id, export=True)
|
61 |
ov_model.save_pretrained(folder)
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
transformers
|
2 |
diffusers
|
3 |
-
optimum==1.
|
4 |
-
|
|
|
1 |
transformers
|
2 |
diffusers
|
3 |
+
optimum==1.8.1
|
4 |
+
optimum-intel[openvino]==1.8.0
|