shashankheg commited on
Commit
2fb7b72
·
1 Parent(s): 7283897

Fix Gradio 6.15 compatibility

Browse files
Files changed (1) hide show
  1. src/app.py +4 -3
src/app.py CHANGED
@@ -175,7 +175,7 @@ def create_app():
175
  with gr.Tab("💬 Chat"):
176
  gr.HTML('<p class="section-title">AI Chat Assistant</p><p class="section-subtitle">Multi-turn conversations powered by LangGraph + LLaMA 3.3 70B</p>')
177
  with gr.Column(elem_classes="feature-card"):
178
- chatbot = gr.Chatbot(height=450, label="", elem_classes="chatbot", show_label=False,type="messages")
179
  with gr.Row():
180
  c_input = gr.Textbox(label="", placeholder="Ask me anything...", scale=5, container=False)
181
  c_btn = gr.Button("Send ➜", variant="primary", scale=1)
@@ -188,8 +188,8 @@ def create_app():
188
  return "", history
189
  response = chat_session.chat(message)
190
  history = history or []
191
- history.append({"role": "user", "content": message})
192
- history.append({"role": "assistant", "content": response})
193
  return "", history
194
 
195
  def clear():
@@ -254,6 +254,7 @@ if __name__ == "__main__":
254
  server_name="0.0.0.0",
255
  server_port=7860,
256
  share=False,
 
257
 
258
 
259
  )
 
175
  with gr.Tab("💬 Chat"):
176
  gr.HTML('<p class="section-title">AI Chat Assistant</p><p class="section-subtitle">Multi-turn conversations powered by LangGraph + LLaMA 3.3 70B</p>')
177
  with gr.Column(elem_classes="feature-card"):
178
+ chatbot = gr.Chatbot(height=450, label="", elem_classes="chatbot", show_label=False)
179
  with gr.Row():
180
  c_input = gr.Textbox(label="", placeholder="Ask me anything...", scale=5, container=False)
181
  c_btn = gr.Button("Send ➜", variant="primary", scale=1)
 
188
  return "", history
189
  response = chat_session.chat(message)
190
  history = history or []
191
+ history.append((message, response))
192
+ # history.append({"role": "assistant", "content": response})
193
  return "", history
194
 
195
  def clear():
 
254
  server_name="0.0.0.0",
255
  server_port=7860,
256
  share=False,
257
+ css=custom_css
258
 
259
 
260
  )