Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -16,12 +16,12 @@ app = FastAPI()
|
|
16 |
# Load the original tokenizer from the base model
|
17 |
original_tokenizer = AutoTokenizer.from_pretrained("tabularisai/multilingual-sentiment-analysis")
|
18 |
|
19 |
-
|
20 |
|
21 |
# Load the fine-tuned model and pass the tokenizer explicitly
|
22 |
multilingual_model = pipeline(
|
23 |
"sentiment-analysis",
|
24 |
-
model=
|
25 |
tokenizer=original_tokenizer
|
26 |
)
|
27 |
|
|
|
16 |
# Load the original tokenizer from the base model
|
17 |
original_tokenizer = AutoTokenizer.from_pretrained("tabularisai/multilingual-sentiment-analysis")
|
18 |
|
19 |
+
model_path = os.path.join(os.path.dirname(__file__), "multimodel")
|
20 |
|
21 |
# Load the fine-tuned model and pass the tokenizer explicitly
|
22 |
multilingual_model = pipeline(
|
23 |
"sentiment-analysis",
|
24 |
+
model=model_path,
|
25 |
tokenizer=original_tokenizer
|
26 |
)
|
27 |
|