SaiPavankumar22 commited on
Commit
915b4bd
Β·
1 Parent(s): 0d5941e

resolved the deployment issues

Browse files
Files changed (1) hide show
  1. app.py +4 -33
app.py CHANGED
@@ -836,38 +836,9 @@ def create_interface():
836
 
837
 
838
  if __name__ == "__main__":
839
- print("πŸ—οΈ" + "="*80)
840
- print("πŸ—οΈ STARTING CONSTRUCTION COMPANY AI ASSISTANT")
841
- print("πŸ—οΈ" + "="*80)
842
- print("🧠 AI Model: DeepSeek R1 (Advanced Reasoning)")
843
- print("🌐 API Provider: OpenRouter")
844
- print("πŸ” Web Search: Serper API")
845
- print(f"πŸ“‘ Search Status: {'βœ… ENABLED' if chatbot.search_tool else '❌ DISABLED (Check API Key)'}")
846
- print("πŸ€– Agent Framework: CrewAI")
847
- print("πŸ’¬ Interface: Gradio with Construction Theme")
848
- print("🚨 Query Filter: Construction Topics ONLY")
849
- print("πŸ’­ Memory: Rolling window of 5 conversations")
850
- print("πŸ—οΈ" + "="*80)
851
- print("πŸš€ Launching interface...")
852
-
853
 
854
- if chatbot.search_tool:
855
- print("βœ… Web search tool initialized successfully!")
856
- print("πŸ’‘ Users can get real-time construction data")
857
  else:
858
- print("⚠️ Web search disabled - check SERPER_API_KEY")
859
- print("πŸ’‘ Assistant will work with knowledge base only")
860
-
861
- print("πŸ—οΈ" + "="*80)
862
-
863
-
864
- interface = create_interface()
865
- interface.launch(
866
- share=False,
867
- server_name="0.0.0.0",
868
- server_port=7863,
869
- show_error=True,
870
- debug=False,
871
- favicon_path=None,
872
- inbrowser=True
873
- )
 
836
 
837
 
838
  if __name__ == "__main__":
839
+ interface = create_interface()
 
 
 
 
 
 
 
 
 
 
 
 
 
840
 
841
+ if os.getenv("SPACE_ID"):
842
+ interface.launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT", 7860)))
 
843
  else:
844
+ interface.launch(inbrowser=True, server_name="0.0.0.0", server_port=7860)