suraj-self commited on
Commit
d420af1
·
1 Parent(s): e11f585

cosmatic changes

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -60,9 +60,8 @@ def predict(message, history):
60
  except Exception as e:
61
  yield f"⚠️ System Error: {str(e)}"
62
 
63
- # --- Safe UI Customization ---
64
- # We wrap the Interface in Blocks to ensure the theme is applied correctly
65
- with gr.Blocks(theme=gr.themes.Soft(primary_hue="indigo", secondary_hue="slate")) as demo:
66
  gr.ChatInterface(
67
  fn=predict,
68
  title="⚡ SimpleAI-259M",
@@ -72,9 +71,13 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="indigo", secondary_hue="slate")
72
  "Write a Python function to calculate the area of a circle.",
73
  "Which part of a plant is usually responsible for making food using sunlight?",
74
  "What is the capital of France?"
75
- ],
76
- type="messages"
77
  )
78
 
79
  if __name__ == "__main__":
80
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
 
 
 
 
 
60
  except Exception as e:
61
  yield f"⚠️ System Error: {str(e)}"
62
 
63
+ # --- UI Customization for Gradio 6.0 ---
64
+ with gr.Blocks() as demo:
 
65
  gr.ChatInterface(
66
  fn=predict,
67
  title="⚡ SimpleAI-259M",
 
71
  "Write a Python function to calculate the area of a circle.",
72
  "Which part of a plant is usually responsible for making food using sunlight?",
73
  "What is the capital of France?"
74
+ ]
 
75
  )
76
 
77
  if __name__ == "__main__":
78
+ # Moved 'theme' here as requested by the Gradio 6.0 Warning
79
+ demo.launch(
80
+ server_name="0.0.0.0",
81
+ server_port=7860,
82
+ theme=gr.themes.Soft(primary_hue="indigo", secondary_hue="slate")
83
+ )