Spaces:
Build error
Build error
Upload 2 files
Browse files
app.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import pipeline
|
| 3 |
-
|
| 4 |
## create a new FASTAPI app instance
|
| 5 |
app=FastAPI()
|
| 6 |
|
| 7 |
# Initialize the text generation pipeline
|
| 8 |
-
pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
@app.get("/")
|
| 12 |
def home():
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from transformers import pipeline
|
| 4 |
## create a new FASTAPI app instance
|
| 5 |
app=FastAPI()
|
| 6 |
|
| 7 |
# Initialize the text generation pipeline
|
|
|
|
| 8 |
|
| 9 |
+
#pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 10 |
+
# Use a pipeline as a high-level helper
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
pipe = pipeline("text-generation", model="mistralai/Mistral-7B-v0.1")
|
| 14 |
|
| 15 |
@app.get("/")
|
| 16 |
def home():
|