Ehrii commited on
Commit
525c61f
·
verified ·
1 Parent(s): aa33721

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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
- model_name = "Ehrii/multimodel" # Replace with your username/repo name
20
 
21
  # Load the fine-tuned model and pass the tokenizer explicitly
22
  multilingual_model = pipeline(
23
  "sentiment-analysis",
24
- model=model_name,
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