Spaces:
Running
Running
tokenized outputs
Browse files
app.py
CHANGED
|
@@ -15,12 +15,12 @@ def predict(deepmoji_analysis):
|
|
| 15 |
output_text = ""
|
| 16 |
for p in predictions:
|
| 17 |
output_text += p['label'] + ' (' + str(p['score']) + ")\n"
|
| 18 |
-
return output_text
|
| 19 |
|
| 20 |
gradio_app = gr.Interface(
|
| 21 |
fn=predict,
|
| 22 |
inputs="text",
|
| 23 |
-
outputs="text",
|
| 24 |
examples=[
|
| 25 |
"This GOT show just remember LOTR times!",
|
| 26 |
"Man, can't believe that my 30 days of training just got a NaN loss",
|
|
|
|
| 15 |
output_text = ""
|
| 16 |
for p in predictions:
|
| 17 |
output_text += p['label'] + ' (' + str(p['score']) + ")\n"
|
| 18 |
+
return [distil_tokenizer(deepmoji_analysis)["input_ids"], output_text]
|
| 19 |
|
| 20 |
gradio_app = gr.Interface(
|
| 21 |
fn=predict,
|
| 22 |
inputs="text",
|
| 23 |
+
outputs=["text", "text"],
|
| 24 |
examples=[
|
| 25 |
"This GOT show just remember LOTR times!",
|
| 26 |
"Man, can't believe that my 30 days of training just got a NaN loss",
|