Spaces:
Runtime error
Runtime error
| import requests | |
| from . import app | |
| API_URL = "https://api-inference.huggingface.co/models/google/gemma-1.1-7b-it" | |
| def query(payload): | |
| response = requests.post(API_URL, json=payload) | |
| return response.json() | |
| def api_home(): | |
| return {'detail': 'Welcome to FastAPI TextGen Tutorial!'} | |
| def inference(input: str): | |
| return query({"inputs": input}) | |