Thiloid commited on
Commit
8aa712d
·
verified ·
1 Parent(s): 5efc135

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +9 -8
run.py CHANGED
@@ -156,14 +156,15 @@ def submit_url(url: str):
156
  print(f"Received URL: {url}")
157
  return url
158
 
159
- chatbot = gr.ChatInterface(
160
- response,
161
- chatbot=gr.Chatbot(value=[[None, "Herzlich willkommen! Ich bin Chätti ein KI-basiertes Studienassistenzsystem, das für jede Anfrage die am besten Studieninformationen empfiehlt.<br>Erzähle mir, was du gerne tust!"]], render_markdown=True),
162
- title="German Studyhelper Chätti"
163
- )
164
-
165
- # Add a route to handle the URL submission
166
- chatbot.launch(share=True, js=js_code())
 
167
 
168
  @gr.routes.post("/submit_url")
169
  async def process_url(request):
 
156
  print(f"Received URL: {url}")
157
  return url
158
 
159
+ with gr.Blocks() as chatbot:
160
+ gr.HTML(js_code())
161
+ chat_interface = gr.ChatInterface(
162
+ response,
163
+ chatbot=gr.Chatbot(value=[[None, "Herzlich willkommen! Ich bin Chätti ein KI-basiertes Studienassistenzsystem, das für jede Anfrage die am besten Studieninformationen empfiehlt.<br>Erzähle mir, was du gerne tust!"]], render_markdown=True),
164
+ title="German Studyhelper Chätti"
165
+ )
166
+
167
+ chatbot.launch(share=True)
168
 
169
  @gr.routes.post("/submit_url")
170
  async def process_url(request):