| from fastapi import FastAPI | |
| import requests | |
| app = FastAPI() | |
| API_URL = "https://api-inference.huggingface.co/models/shibly100/shiblymy" | |
| HEADERS = {"Authorization": "Bearer YOUR_HUGGINGFACE_API_TOKEN"} | |
| def generate_text(input_text: str): | |
| response = requests.post(API_URL, headers=HEADERS, json={"inputs": input_text}) | |
| return response.json() # ✅ Fixed indentation | |