modified dockerfile
Browse files- Dockerfile +1 -1
- __pycache__/app.cpython-311.pyc +0 -0
- __pycache__/mcp_server.cpython-311.pyc +0 -0
- app.py +7 -0
Dockerfile
CHANGED
|
@@ -22,4 +22,4 @@ COPY --chown=appuser:appuser . /app
|
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
# Command to run the app with uvicorn on port 7860, listening on all interfaces
|
| 25 |
-
CMD ["
|
|
|
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
# Command to run the app with uvicorn on port 7860, listening on all interfaces
|
| 25 |
+
CMD ["python", "app.py"]
|
__pycache__/app.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
|
__pycache__/mcp_server.cpython-311.pyc
ADDED
|
Binary file (7.85 kB). View file
|
|
|
app.py
CHANGED
|
@@ -12,6 +12,8 @@ from pydantic import BaseModel
|
|
| 12 |
from huggingface_hub.inference._mcp.agent import Agent
|
| 13 |
from dotenv import load_dotenv
|
| 14 |
|
|
|
|
|
|
|
| 15 |
load_dotenv()
|
| 16 |
|
| 17 |
# Configuration
|
|
@@ -112,7 +114,9 @@ async def get_agent():
|
|
| 112 |
await agent_instance.load_tools()
|
| 113 |
print("β
Tools loaded successfully")
|
| 114 |
except Exception as e:
|
|
|
|
| 115 |
print(f"β Error creating/loading agent: {str(e)}")
|
|
|
|
| 116 |
agent_instance = None
|
| 117 |
elif agent_instance is None:
|
| 118 |
print("β No HF_TOKEN available, cannot create agent")
|
|
@@ -379,6 +383,7 @@ Please process all {len(all_tags)} tags: {", ".join(all_tags)}
|
|
| 379 |
|
| 380 |
except Exception as e:
|
| 381 |
error_msg = f"β Fatal error in process_webhook_comment: {str(e)}"
|
|
|
|
| 382 |
print(error_msg)
|
| 383 |
return error_msg
|
| 384 |
|
|
@@ -560,3 +565,5 @@ if __name__ == "__main__":
|
|
| 560 |
print("π Dashboard: http://localhost:7860/gradio")
|
| 561 |
print("π Webhook: http://localhost:7860/webhook")
|
| 562 |
uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
|
|
|
|
|
|
|
|
|
| 12 |
from huggingface_hub.inference._mcp.agent import Agent
|
| 13 |
from dotenv import load_dotenv
|
| 14 |
|
| 15 |
+
import traceback
|
| 16 |
+
|
| 17 |
load_dotenv()
|
| 18 |
|
| 19 |
# Configuration
|
|
|
|
| 114 |
await agent_instance.load_tools()
|
| 115 |
print("β
Tools loaded successfully")
|
| 116 |
except Exception as e:
|
| 117 |
+
import traceback
|
| 118 |
print(f"β Error creating/loading agent: {str(e)}")
|
| 119 |
+
traceback.print_exc()
|
| 120 |
agent_instance = None
|
| 121 |
elif agent_instance is None:
|
| 122 |
print("β No HF_TOKEN available, cannot create agent")
|
|
|
|
| 383 |
|
| 384 |
except Exception as e:
|
| 385 |
error_msg = f"β Fatal error in process_webhook_comment: {str(e)}"
|
| 386 |
+
traceback.print_exc()
|
| 387 |
print(error_msg)
|
| 388 |
return error_msg
|
| 389 |
|
|
|
|
| 565 |
print("π Dashboard: http://localhost:7860/gradio")
|
| 566 |
print("π Webhook: http://localhost:7860/webhook")
|
| 567 |
uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
|
| 568 |
+
|
| 569 |
+
|