Spaces:
Runtime error
Runtime error
| import os | |
| os.environ["HF_HOME"] = "/tmp/huggingface" | |
| os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface/cache" | |
| from fastapi import FastAPI | |
| from agent import run_agent | |
| app = FastAPI() | |
| async def root(): | |
| return {"message": "Autonomous AI is running!"} | |
| async def run(data: dict): | |
| response = run_agent(data) | |
| return {"result": response} | |