Renecto commited on
Commit
25c1d65
1 Parent(s): acb3120

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,14 +5,14 @@ import concurrent.futures
5
  def greet_para(params_text):
6
  params = params_text.split("\n")
7
  with concurrent.futures.ThreadPoolExecutor() as executor:
8
- results = list(executor.map(fetch_api, params))
9
  return results
10
 
11
  def greet(name):
12
  client = Client("Renecto/queue_10_limit")
13
- r = client.submit(name="Hello!!", api_name="/predict")
14
  return r.result()
15
 
16
- demo = gr.Interface(fn=greet_para, inputs="text", outputs="json")
17
  demo.launch()
18
 
 
5
  def greet_para(params_text):
6
  params = params_text.split("\n")
7
  with concurrent.futures.ThreadPoolExecutor() as executor:
8
+ results = list(executor.map(greet, params))
9
  return results
10
 
11
  def greet(name):
12
  client = Client("Renecto/queue_10_limit")
13
+ r = client.submit(name=name, api_name="/predict")
14
  return r.result()
15
 
16
+ demo = gr.Interface(fn=greet_para, inputs=gr.textAArea(), outputs="json")
17
  demo.launch()
18