thak123 commited on
Commit
568e03b
1 Parent(s): 42c019f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ model_link = hf_hub_download(repo_id="FFZG-cleopatra/Croatian-News-Classifier",f
18
  multitask_model.load_state_dict(torch.load(model_link, map_location=device))
19
  multitask_model.to(device)
20
 
21
- def predict(sentence = "Volim ti"):
22
  # gather everyone if you want to have a single DatasetDict
23
  document = DatasetDict({
24
  # "train": Dataset.from_pandas(df_document_sl_hr_train),
@@ -65,7 +65,7 @@ def predict(sentence = "Volim ti"):
65
 
66
 
67
  interface = gr.Interface(
68
- fn=get_sentiment,
69
  inputs='text',
70
  outputs=['text', 'label'],
71
  title='Sentiment Analysis',
 
18
  multitask_model.load_state_dict(torch.load(model_link, map_location=device))
19
  multitask_model.to(device)
20
 
21
+ def predict_sentiment(sentence = "Volim ti"):
22
  # gather everyone if you want to have a single DatasetDict
23
  document = DatasetDict({
24
  # "train": Dataset.from_pandas(df_document_sl_hr_train),
 
65
 
66
 
67
  interface = gr.Interface(
68
+ fn=predict_sentiment,
69
  inputs='text',
70
  outputs=['text', 'label'],
71
  title='Sentiment Analysis',