shivay00001 commited on
Commit
3eadab5
·
verified ·
1 Parent(s): 4270afb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -2386,15 +2386,18 @@ if __name__ == "__main__":
2386
  import gradio as gr
2387
 
2388
  def simple_chat(message):
2389
- return f"AI model loading... Please wait. Error: {str(e)}"
2390
-
2391
- demo = gr.Interface(
2392
- fn=simple_chat,
2393
- inputs="text",
2394
- outputs="text",
2395
- title="Cosmic AI - Loading..."
 
 
 
2396
  )
2397
- demo.launch(
2398
  server_name="0.0.0.0",
2399
  server_port=7860,
2400
  share=True # Important for HF Spaces
 
2386
  import gradio as gr
2387
 
2388
  def simple_chat(message):
2389
+ """Enhanced fallback function"""
2390
+ responses = [
2391
+ "🤖 Cosmic AI is starting up... Please wait!",
2392
+ "🔄 AI model is loading, your patience is appreciated!",
2393
+ "⏳ System initialization in progress...",
2394
+ "🌟 Getting ready to chat with you!"
2395
+ ]
2396
+ import random
2397
+ return random.choice(responses)
2398
+
2399
  )
2400
+ interface.launch(
2401
  server_name="0.0.0.0",
2402
  server_port=7860,
2403
  share=True # Important for HF Spaces