traversaal-ai commited on
Commit
c104447
·
1 Parent(s): cb8be52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -8,7 +8,7 @@ def call_gradio_api(user_input):
8
 
9
  client = Client("https://traversaal-internal-rag-faiss-gpt3-5.hf.space/", hf_token=access_token)
10
  result = client.predict(user_input, api_name="/predict")
11
- return result[0], result[1], result[2], result[3],result[4]
12
 
13
  # Interface for the Gradio app
14
 
@@ -35,7 +35,7 @@ questions = gr.JSON(
35
  iface = gr.Interface(
36
  fn=call_gradio_api,
37
  inputs="text",
38
- outputs = [new_prompt, chat_response_1, chat_response_2, source_list,questions],
39
  examples=["Make me a 4-hour workshop agenda for handling conflict", "Tell me about the different skills from middle management to executive leadership", "What are some of the major debates among scholars regarding the trait versus process theories of leadership? How have these perspectives evolved over time?"],
40
  layout="horizontal",
41
  title="CCL Playground",
@@ -43,4 +43,5 @@ iface = gr.Interface(
43
  )
44
 
45
  # Launch the Gradio app
46
- iface.launch()
 
 
8
 
9
  client = Client("https://traversaal-internal-rag-faiss-gpt3-5.hf.space/", hf_token=access_token)
10
  result = client.predict(user_input, api_name="/predict")
11
+ return result[0], result[1], result[2], result[3], result[4]
12
 
13
  # Interface for the Gradio app
14
 
 
35
  iface = gr.Interface(
36
  fn=call_gradio_api,
37
  inputs="text",
38
+ outputs = [new_prompt, chat_response_1, chat_response_2, source_list, questions],
39
  examples=["Make me a 4-hour workshop agenda for handling conflict", "Tell me about the different skills from middle management to executive leadership", "What are some of the major debates among scholars regarding the trait versus process theories of leadership? How have these perspectives evolved over time?"],
40
  layout="horizontal",
41
  title="CCL Playground",
 
43
  )
44
 
45
  # Launch the Gradio app
46
+ iface.queue().launch()
47
+