Spaces:
Runtime error
Runtime error
from fastapi import FastAPI | |
from transformers import pipeline | |
import os | |
app = FastAPI() | |
pipe_flan = pipeline("text2text-generation", model="mistralai/Mistral-7B-v0.3") | |
def mistral(input: str): | |
output = pipe_flan(input) | |
return {"output": output[0]["generated_text"]} | |
def greet_json(): | |
return {"Hello": "World!"} | |