Nuno-Tome commited on
Commit
26349dc
·
1 Parent(s): 6c7a215

no message

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,13 +1,21 @@
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
 
 
1
  from gradio_client import Client
2
  import gradio as gr
3
 
4
+ DEBUG_MODE = True
5
+
6
  client = Client("Nuno-Tome/API_demo_server")
7
 
8
  def request(text):
9
+ if DEBUG_MODE:
10
+ print(f"Client: {client}")
11
+ print(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
+ print(f"Prediction result: {result}")
19
  return result
20
 
21