Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,20 +1,3 @@
|
|
| 1 |
-
# from fastapi import FastAPI
|
| 2 |
-
# from transformers import pipeline
|
| 3 |
-
|
| 4 |
-
# app = FastAPI() # app instance
|
| 5 |
-
|
| 6 |
-
# @app.get("/")
|
| 7 |
-
# def root():
|
| 8 |
-
# return {"message": "Hello World"}
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
# pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 12 |
-
|
| 13 |
-
# @app.get("/generate")
|
| 14 |
-
# def generate(prompt: str):
|
| 15 |
-
# response = pipe(prompt)
|
| 16 |
-
|
| 17 |
-
# return {"response": response[0]['generated_text']}
|
| 18 |
|
| 19 |
from fastapi import FastAPI
|
| 20 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
from fastapi import FastAPI
|
| 3 |
from transformers import pipeline
|