AbenzaFran commited on
Commit
7b845f6
·
verified ·
1 Parent(s): 950a6af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -8,7 +8,7 @@ from langchain.agents import AgentExecutor
8
 
9
  from langchain.schema import HumanMessage, AIMessage
10
 
11
- import gradio
12
 
13
  api_key = os.getenv('OPENAI_API_KEY')
14
  extractor_agent = os.getenv('ASSISTANT_ID_SOLUTION_SPECIFIER_A')
@@ -33,6 +33,10 @@ def predict(message, history):
33
  non_cited_output = remove_citation(output)
34
  return non_cited_output
35
 
 
 
 
 
 
36
 
37
- chat = gradio.ChatInterface(predict, title="Solution Specifier A", description="testing for the time being")
38
- chat.launch(share=True)
 
8
 
9
  from langchain.schema import HumanMessage, AIMessage
10
 
11
+ import gradio as gr
12
 
13
  api_key = os.getenv('OPENAI_API_KEY')
14
  extractor_agent = os.getenv('ASSISTANT_ID_SOLUTION_SPECIFIER_A')
 
33
  non_cited_output = remove_citation(output)
34
  return non_cited_output
35
 
36
+ # Create a Gradio Blocks interface
37
+ with gr.Blocks() as interface:
38
+ gr.Markdown("Click [here](https://www.google.com) to visit Google.")
39
+ chat = gr.ChatInterface(predict, title="Solution Specifier A", description="testing for the time being")
40
+ chat.render() # Render the ChatInterface inside Blocks
41
 
42
+ interface.launch(share=True)