first_doc / app.py
arshadrana's picture
Update app.py
7b11600 verified
raw
history blame contribute delete
313 Bytes
from fastapi import FastAPI
from transformers import pipeline
app = FastAPI()
# Load a Hugging Face model
model = pipeline("text-classification", model="distilbert-base-uncased-finetuned-sst-2-english")
print("i am gherer enjoying ")
@app.post("/predict")
async def predict():
return { "i am in lodhran "}