MohamedSaeed-dev commited on
Commit
39df819
1 Parent(s): 6920adf

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -4,14 +4,11 @@ from transformers import pipeline
4
  app = FastAPI()
5
 
6
 
7
- pipe = pipeline("text-generation", model="MohamedSaeed-dev/gemma-2b-1500steps")
8
 
9
  @app.post("/generate")
10
  async def generate_text(text:str):
11
- messages = [
12
- {"role": "user", "content": text},
13
- ]
14
- output = pipe(messages)
15
  return {"output": output}
16
 
17
  @app.get("/")
 
4
  app = FastAPI()
5
 
6
 
7
+ pipe = pipeline("text-generation", model="google/flan-t5-small")
8
 
9
  @app.post("/generate")
10
  async def generate_text(text:str):
11
+ output = pipe(text)
 
 
 
12
  return {"output": output}
13
 
14
  @app.get("/")