mirxakamran893 commited on
Commit
f7ca90e
·
verified ·
1 Parent(s): 621e0b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -49,14 +49,15 @@ def chat_fn(message, history):
49
 
50
  return reply
51
 
52
- # ✅ ChatInterface exposes /run/predict
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__":