Soltane777 commited on
Commit
8f651fe
·
verified ·
1 Parent(s): 497c84b

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py DELETED
@@ -1,17 +0,0 @@
1
- import os
2
- from fastapi import FastAPI
3
- from transformers import pipeline
4
-
5
- app = FastAPI()
6
-
7
- pipe = pipeline("text2text-generation", model="google/flan-t5-small")
8
-
9
- @app.get("/")
10
- def home():
11
- return {"message": "Hello World!"}
12
-
13
- @app.get("/generate")
14
- def generate(text: str):
15
- output = pipe(text)
16
- return {"output": output[0]["generated_text"]}
17
-