agnixcode commited on
Commit
b87ef21
·
verified ·
1 Parent(s): 1077330

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -188,9 +188,9 @@ def chat(user_message: str, history: list):
188
  return history, ""
189
 
190
  # ---------------------------------------------------------------------------
191
- # 6. Gradio UI – Gradio 6.0 compatible
192
  # ---------------------------------------------------------------------------
193
- with gr.Blocks(title="YouTube RAG Chatbot") as app: # ← theme removed here
194
 
195
  gr.Markdown(
196
  """
@@ -219,7 +219,7 @@ with gr.Blocks(title="YouTube RAG Chatbot") as app: # ← theme removed here
219
  lines=6,
220
  interactive=False,
221
  )
222
- transcript_output = gr.Textbox( # ← show_copy_button removed
223
  label="Transcript (read-only)",
224
  lines=15,
225
  interactive=False,
@@ -238,7 +238,6 @@ with gr.Blocks(title="YouTube RAG Chatbot") as app: # ← theme removed here
238
  chatbot = gr.Chatbot(
239
  label="Conversation",
240
  height=450,
241
- bubble_full_width=False,
242
  )
243
 
244
  with gr.Row():
@@ -267,9 +266,7 @@ with gr.Blocks(title="YouTube RAG Chatbot") as app: # ← theme removed here
267
  clear_btn.click(fn=lambda: ([], []), outputs=[chatbot, chat_history])
268
 
269
  # ---------------------------------------------------------------------------
270
- # Launch – theme goes here in Gradio 6.0
271
  # ---------------------------------------------------------------------------
272
  if __name__ == "__main__":
273
- app.launch() # ← theme=gr.themes.Soft() can go here
274
- # if you want it back, e.g.:
275
- # app.launch(theme=gr.themes.Soft())
 
188
  return history, ""
189
 
190
  # ---------------------------------------------------------------------------
191
+ # 6. Gradio UI – fully Gradio 6.0 compatible (no deprecated args)
192
  # ---------------------------------------------------------------------------
193
+ with gr.Blocks(title="YouTube RAG Chatbot") as app:
194
 
195
  gr.Markdown(
196
  """
 
219
  lines=6,
220
  interactive=False,
221
  )
222
+ transcript_output = gr.Textbox(
223
  label="Transcript (read-only)",
224
  lines=15,
225
  interactive=False,
 
238
  chatbot = gr.Chatbot(
239
  label="Conversation",
240
  height=450,
 
241
  )
242
 
243
  with gr.Row():
 
266
  clear_btn.click(fn=lambda: ([], []), outputs=[chatbot, chat_history])
267
 
268
  # ---------------------------------------------------------------------------
269
+ # Launch
270
  # ---------------------------------------------------------------------------
271
  if __name__ == "__main__":
272
+ app.launch()