Spaces:
Runtime error
Runtime error
Update model_utils.py
Browse files- model_utils.py +4 -1
model_utils.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
|
| 3 |
-
# Replace this with your fine-tuned MCQ extractor if needed
|
| 4 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 5 |
|
| 6 |
labels = ["question", "option", "answer", "other"]
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
os.environ["TRANSFORMERS_CACHE"] = "./cache"
|
| 3 |
+
os.environ["HF_HOME"] = "./cache" # also set HF_HOME to cache in same dir
|
| 4 |
+
|
| 5 |
from transformers import pipeline
|
| 6 |
|
|
|
|
| 7 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 8 |
|
| 9 |
labels = ["question", "option", "answer", "other"]
|