Spaces:
Runtime error
Runtime error
Update app.py
Browse files29 unmodified lines3031323334353654 unmodified lines91929394959629 unmodified lines"Content-Type": "application/json"}data = {"model": "llama3-8b-8192","messages": conversation,"max_tokens": 500}54 unmodified lines)clear.click(lambda: None, None, chatbot, queue=False)# Launch the interfaceiface.launch()29 unmodified lines3031323334353654 unmodified lines91929394959697989910010110210310410510610710810911011111211311411511611711829 unmodified lines"Content-Type": "application/json"}data = {"model": "mixtral-8x7b-32768","messages": conversation,"max_tokens": 500}54 unmodified lines)clear.click(lambda: None, None, chatbot, queue=False)# Add dark mode togglewith gr.Row():dark_mode = gr.Checkbox(label="Dark Mode", value=False)def toggle_dark_mode(dark):if dark:return gr.themes.Default(primary_hue="blue", neutral_hue="slate", text_size="lg").set(body_background_fill="*neutral_900",block_background_fill="*neutral_800",button_primary_background_fill="*primary_600",button_primary_background_fill_dark="*primary_700",)else:return gr.themes.Default(primary_hue="blue", neutral_hue="slate", text_size="lg").set(body_background_fill="*neutral_50",block_background_fill="*neutral_100",button_primary_background_fill="*primary_500",button_primary_background_fill_dark="*primary_600",)dark_mode.change(toggle_dark_mode, dark_mode, None)# Launch the interfaceiface.launch()
app.py+23-1