Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -39,7 +39,7 @@ try:
|
|
39 |
"sentiment-analysis",
|
40 |
model=MULTILINGUAL_MODEL_NAME,
|
41 |
tokenizer=multilingual_tokenizer,
|
42 |
-
|
43 |
)
|
44 |
except Exception as e:
|
45 |
raise RuntimeError(f"Failed to load multilingual model: {e}")
|
@@ -49,7 +49,7 @@ try:
|
|
49 |
english_model = pipeline(
|
50 |
"sentiment-analysis",
|
51 |
model=ENGLISH_MODEL_NAME,
|
52 |
-
|
53 |
)
|
54 |
except Exception as e:
|
55 |
raise RuntimeError(f"Failed to load English sentiment model: {e}")
|
|
|
39 |
"sentiment-analysis",
|
40 |
model=MULTILINGUAL_MODEL_NAME,
|
41 |
tokenizer=multilingual_tokenizer,
|
42 |
+
token=HF_TOKEN
|
43 |
)
|
44 |
except Exception as e:
|
45 |
raise RuntimeError(f"Failed to load multilingual model: {e}")
|
|
|
49 |
english_model = pipeline(
|
50 |
"sentiment-analysis",
|
51 |
model=ENGLISH_MODEL_NAME,
|
52 |
+
token=HF_TOKEN
|
53 |
)
|
54 |
except Exception as e:
|
55 |
raise RuntimeError(f"Failed to load English sentiment model: {e}")
|