Spaces:
Sleeping
Sleeping
test
Browse files- app.py +10 -4
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,8 +1,14 @@
|
|
1 |
from gradio_client import Client
|
|
|
2 |
|
3 |
client = Client("Nuno-Tome/API_demo_server")
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
api_name="/predict"
|
7 |
-
)
|
8 |
-
|
|
|
|
|
|
|
|
1 |
from gradio_client import Client
|
2 |
+
import gradio as gr
|
3 |
|
4 |
client = Client("Nuno-Tome/API_demo_server")
|
5 |
+
|
6 |
+
def request(text):
|
7 |
+
result = client.predict(
|
8 |
+
"Hello World", # str in 'text' Textbox component
|
9 |
api_name="/predict"
|
10 |
+
)
|
11 |
+
return result
|
12 |
+
|
13 |
+
|
14 |
+
io = gr.Interface(request, "textbox", "json")
|
requirements.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
gradio_client
|
|
|
|
1 |
+
gradio_client
|
2 |
+
gradio
|