Spaces:
Runtime error
Runtime error
Download app.py from timbosssds/testhtml: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/timbosssds/testhtml/resolve/main/app.py
- Command line
-
hf download hf://spaces/timbosssds/testhtml/app.py
-
curl -L -o app.py https://huggingface.co/spaces/timbosssds/testhtml/resolve/main/app.py
369 Bytes
| from fastapi import FastAPI, Body | |
| #from llm.model import predict | |
| app = FastAPI() | |
| async def make_prediction(data: dict = Body(...)): | |
| # Get user input from the request body | |
| user_input = data["input"] | |
| # Call the LLM model for prediction | |
| output = predict(user_input) | |
| # Return the prediction as JSON | |
| return {"output": output} | |