Commit
Β·
915b4bd
1
Parent(s):
0d5941e
resolved the deployment issues
Browse files
app.py
CHANGED
|
@@ -836,38 +836,9 @@ def create_interface():
|
|
| 836 |
|
| 837 |
|
| 838 |
if __name__ == "__main__":
|
| 839 |
-
|
| 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
|
| 855 |
-
|
| 856 |
-
print("π‘ Users can get real-time construction data")
|
| 857 |
else:
|
| 858 |
-
|
| 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|