Spaces:
Runtime error
Runtime error
Update app.py
Browse filesresolving error
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="
|
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 |
|