Spaces:
Running
Running
output_text
Browse files
app.py
CHANGED
|
@@ -11,7 +11,11 @@ pipeline = pipeline(task="text-classification", model=distil_model, tokenizer=di
|
|
| 11 |
|
| 12 |
def predict(deepmoji_analysis):
|
| 13 |
predictions = pipeline(deepmoji_analysis)
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
gradio_app = gr.Interface(
|
| 17 |
fn=predict,
|
|
|
|
| 11 |
|
| 12 |
def predict(deepmoji_analysis):
|
| 13 |
predictions = pipeline(deepmoji_analysis)
|
| 14 |
+
|
| 15 |
+
output_text = ""
|
| 16 |
+
for p in predictions:
|
| 17 |
+
output_text += p['label'] + p['score'] + "\n"
|
| 18 |
+
return output_text
|
| 19 |
|
| 20 |
gradio_app = gr.Interface(
|
| 21 |
fn=predict,
|