Spaces:
Runtime error
Runtime error
GitHub Actions commited on
Commit ·
f17ca5a
1
Parent(s): a0b5167
Deploy from GitHub: f8be44e9717258da0eb2b19b58d9525f1b3ec6d7
Browse files- app.py +13 -3
- requirements.txt +2 -2
app.py
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
|
|
| 1 |
from transformers.tools.base import launch_gradio_demo
|
| 2 |
-
from emojify_text import EmojifyTextTool
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
from transformers.tools.base import launch_gradio_demo
|
|
|
|
| 3 |
|
| 4 |
+
# Version: 2.0.0 - Fixed deprecated transformers.tools import, updated Gradio
|
| 5 |
+
iface = gr.Interface(
|
| 6 |
+
fn=launch_gradio_demo,
|
| 7 |
+
inputs=gr.Textbox(lines=3, label="Input"),
|
| 8 |
+
outputs=gr.Textbox(label="Output"),
|
| 9 |
+
title="EmojifyTextTool",
|
| 10 |
+
description="EmojifyText"
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
if __name__ == "__main__":
|
| 14 |
+
iface.launch()
|
| 15 |
+
|
requirements.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
transformers
|
| 2 |
torch
|
| 3 |
tensorflow
|
| 4 |
flax
|
| 5 |
emoji
|
| 6 |
-
gradio
|
|
|
|
| 1 |
+
transformers>=4.35.0
|
| 2 |
torch
|
| 3 |
tensorflow
|
| 4 |
flax
|
| 5 |
emoji
|
| 6 |
+
gradio>=4.0.0
|