Nuno-Tome commited on
Commit
ca2b37a
Β·
1 Parent(s): 26349dc

no message

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -7,14 +7,15 @@ 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
 
 
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