Spaces:
Runtime error
Runtime error
from pydantic import BaseModel | |
from .ConfigEnv import config | |
from fastapi.middleware.cors import CORSMiddleware | |
from langchain.llms import Clarifai | |
from langchain.chains import LLMChain | |
from langchain.prompts import PromptTemplate | |
from TextGen import app | |
def api_home(): | |
return {'detail': 'Welcome to FastAPI TextGen Tutorial!'} | |
def inference(input_prompt: str): | |
return generate_text(prompt=input_prompt) |