Update app.py
Browse files
app.py
CHANGED
@@ -49,14 +49,15 @@ def chat_fn(message, history):
|
|
49 |
|
50 |
return reply
|
51 |
|
52 |
-
# ✅ ChatInterface
|
53 |
demo = gr.ChatInterface(
|
54 |
fn=chat_fn,
|
55 |
title="CODEX MIRXA KAMRAN",
|
56 |
description="Chat with our RAG-enabled coding assistant powered by OpenRouter",
|
57 |
examples=["How do I use pandas to filter rows?", "Fix this bug in my code", "What is Python typing?"],
|
58 |
theme="soft",
|
59 |
-
chatbot=gr.Chatbot(height=400)
|
|
|
60 |
)
|
61 |
|
62 |
if __name__ == "__main__":
|
|
|
49 |
|
50 |
return reply
|
51 |
|
52 |
+
# ✅ ChatInterface now exposed at /chat
|
53 |
demo = gr.ChatInterface(
|
54 |
fn=chat_fn,
|
55 |
title="CODEX MIRXA KAMRAN",
|
56 |
description="Chat with our RAG-enabled coding assistant powered by OpenRouter",
|
57 |
examples=["How do I use pandas to filter rows?", "Fix this bug in my code", "What is Python typing?"],
|
58 |
theme="soft",
|
59 |
+
chatbot=gr.Chatbot(height=400),
|
60 |
+
api_name="/chat" # ✅ enable POST access via /chat
|
61 |
)
|
62 |
|
63 |
if __name__ == "__main__":
|