Yash Sachdeva commited on
Commit
7046a5d
1 Parent(s): c12ddc3
Files changed (1) hide show
  1. question_paper.py +2 -2
question_paper.py CHANGED
@@ -13,7 +13,7 @@ class Generate(BaseModel):
13
 
14
  def generate_text(prompt: str):
15
  if prompt == "":
16
- return {"detail": "Please provide the syllabus!"}
17
  else:
18
  prompt = PromptTemplate(template=prompt, input_variables=['Prompt'])
19
  llm = Clarifai(
@@ -40,7 +40,7 @@ app.add_middleware(
40
 
41
  @app.get("/", tags=["Home"])
42
  def api_home():
43
- return {'detail': 'Welcome to TextGen!'}
44
 
45
  @app.post("/api/generate", summary="Generate text from prompt", tags=["Generate"], response_model=Generate)
46
  def inference(input_prompt: str):
 
13
 
14
  def generate_text(prompt: str):
15
  if prompt == "":
16
+ return {"detail": "Please provide a prompt."}
17
  else:
18
  prompt = PromptTemplate(template=prompt, input_variables=['Prompt'])
19
  llm = Clarifai(
 
40
 
41
  @app.get("/", tags=["Home"])
42
  def api_home():
43
+ return {'detail': 'Welcome to FastAPI TextGen Tutorial!'}
44
 
45
  @app.post("/api/generate", summary="Generate text from prompt", tags=["Generate"], response_model=Generate)
46
  def inference(input_prompt: str):