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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -8,7 +8,7 @@ from langchain.agents import AgentExecutor
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,10 +33,6 @@ def predict(message, history):
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)
 
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
  non_cited_output = remove_citation(output)
34
  return non_cited_output
35
 
36
+ gradio.Markdown("Click [here](https://www.google.com) to visit Google.")
37
+ chat = gradio.ChatInterface(predict, title="Solution Specifier A", description="testing for the time being")
38
+ chat.launch(share=True)