Spaces:
Runtime error
Runtime error
Update final_codettes_chatbot.py
Browse files
final_codettes_chatbot.py
CHANGED
@@ -14,8 +14,11 @@ class HuggingFaceChatbot:
|
|
14 |
async def chatbot_logic(user_input: str) -> str:
|
15 |
return await self.reasoning_engine.generate_response(user_input)
|
16 |
|
|
|
|
|
|
|
17 |
text_interface = gr.Interface(
|
18 |
-
fn=
|
19 |
inputs=gr.Textbox(label="Ask Codette Anything"),
|
20 |
outputs=gr.Textbox(label="Codette's Thoughts"),
|
21 |
title="🧠 Codette: Multimodal Reasoning Chatbot"
|
@@ -25,4 +28,4 @@ class HuggingFaceChatbot:
|
|
25 |
|
26 |
def launch(self):
|
27 |
app = self.setup_interface()
|
28 |
-
app.launch()
|
|
|
14 |
async def chatbot_logic(user_input: str) -> str:
|
15 |
return await self.reasoning_engine.generate_response(user_input)
|
16 |
|
17 |
+
def sync_chatbot(user_input: str) -> str:
|
18 |
+
return asyncio.run(chatbot_logic(user_input))
|
19 |
+
|
20 |
text_interface = gr.Interface(
|
21 |
+
fn=sync_chatbot,
|
22 |
inputs=gr.Textbox(label="Ask Codette Anything"),
|
23 |
outputs=gr.Textbox(label="Codette's Thoughts"),
|
24 |
title="🧠 Codette: Multimodal Reasoning Chatbot"
|
|
|
28 |
|
29 |
def launch(self):
|
30 |
app = self.setup_interface()
|
31 |
+
app.launch()
|