Spaces:
Sleeping
Sleeping
no message
Browse files
app.py
CHANGED
|
@@ -7,14 +7,15 @@ client = Client("Nuno-Tome/API_demo_server")
|
|
| 7 |
|
| 8 |
def request(text):
|
| 9 |
if DEBUG_MODE:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
result = client.predict(
|
| 13 |
#"Hello World", # str in 'text' Textbox component
|
| 14 |
text,
|
| 15 |
api_name="/predict"
|
| 16 |
)
|
| 17 |
if DEBUG_MODE:
|
|
|
|
| 18 |
print(f"Prediction result: {result}")
|
| 19 |
return result
|
| 20 |
|
|
|
|
| 7 |
|
| 8 |
def request(text):
|
| 9 |
if DEBUG_MODE:
|
| 10 |
+
gr.Markdown("client:" + str(client))
|
| 11 |
+
gr.Markdown(f"## Requesting prediction for: {text}")
|
| 12 |
result = client.predict(
|
| 13 |
#"Hello World", # str in 'text' Textbox component
|
| 14 |
text,
|
| 15 |
api_name="/predict"
|
| 16 |
)
|
| 17 |
if DEBUG_MODE:
|
| 18 |
+
gr.Markdown(f"## Prediction result: {result}")
|
| 19 |
print(f"Prediction result: {result}")
|
| 20 |
return result
|
| 21 |
|