WaveOAK commited on
Commit
149104f
·
verified ·
1 Parent(s): ddce0ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -43,8 +43,8 @@ def call_groq_api(model, instruction, argument):
43
  return f"CONNECTION ERROR: {str(e)}"
44
 
45
  def start_debate(topic, rounds):
46
- # --- UNIVERSAL FORMAT ---
47
- # We use a simple list of lists. Every version of Gradio understands this.
48
  # Format: [[User_Text, Bot_Text], [User_Text, Bot_Text]]
49
  chat_history = []
50
 
@@ -87,11 +87,10 @@ with gr.Blocks() as demo:
87
  rounds_input = gr.Slider(minimum=1, maximum=6, value=2, step=1, label="Rounds")
88
  start_btn = gr.Button("🔥 FIGHT", variant="primary")
89
 
90
- # --- THE FIX: REMOVED 'TYPE' ARGUMENT ---
91
  chatbot = gr.Chatbot(label="Live Feed", height=500)
92
 
93
  start_btn.click(fn=start_debate, inputs=[topic_input, rounds_input], outputs=chatbot)
94
 
95
  if __name__ == "__main__":
96
- demo.launch()
97
-
 
43
  return f"CONNECTION ERROR: {str(e)}"
44
 
45
  def start_debate(topic, rounds):
46
+ # --- CLASSIC TUPLE FORMAT ---
47
+ # Works on Gradio 3, 4, and 5
48
  # Format: [[User_Text, Bot_Text], [User_Text, Bot_Text]]
49
  chat_history = []
50
 
 
87
  rounds_input = gr.Slider(minimum=1, maximum=6, value=2, step=1, label="Rounds")
88
  start_btn = gr.Button("🔥 FIGHT", variant="primary")
89
 
90
+ # --- THE FIX: NO 'TYPE' ARGUMENT ---
91
  chatbot = gr.Chatbot(label="Live Feed", height=500)
92
 
93
  start_btn.click(fn=start_debate, inputs=[topic_input, rounds_input], outputs=chatbot)
94
 
95
  if __name__ == "__main__":
96
+ demo.launch()