MadhuP commited on
Commit
0f926c0
·
1 Parent(s): 0721f88

Update app.py

Browse files

resolving error

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -185,7 +185,7 @@ def word_by_word(txt_url, normalized_content_with_style):
185
  confidence_score_text,
186
  ) = predict_2(txt_url, normalized_content_with_style)
187
 
188
- model = DistilBertForSequenceClassification.from_pretrained(".")
189
  tokenizer = DistilBertTokenizer.from_pretrained(".")
190
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
191
  model = model.to(device)
@@ -251,7 +251,7 @@ demo = gr.Interface(
251
  gr.outputs.Textbox(label="Description").style(show_copy_button=True),
252
  gr.outputs.Textbox(label="Text_prediction_score"),
253
  gr.outputs.Textbox(label="Text_confidence_score"),
254
- gr.outputs.Textbox(label="per word classification").style(show_copy_button=True),
255
  ],
256
  )
257
 
 
185
  confidence_score_text,
186
  ) = predict_2(txt_url, normalized_content_with_style)
187
 
188
+ model = DistilBertForSequenceClassification.from_pretrained("")
189
  tokenizer = DistilBertTokenizer.from_pretrained(".")
190
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
191
  model = model.to(device)
 
251
  gr.outputs.Textbox(label="Description").style(show_copy_button=True),
252
  gr.outputs.Textbox(label="Text_prediction_score"),
253
  gr.outputs.Textbox(label="Text_confidence_score"),
254
+ gr.outputs.Textbox(label="word-by-word").style(show_copy_button=True),
255
  ],
256
  )
257