Vishal1806
commited on
Commit
•
1279f5a
1
Parent(s):
3d0fb6d
Upload app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,7 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
from transformers import pipeline
|
3 |
app=FastAPI()
|
4 |
-
|
5 |
-
{"role": "user", "content": "Who are you?"},
|
6 |
-
]
|
7 |
-
pipe = pipeline("text-generation", model="SciPhi/Triplex", trust_remote_code=True)
|
8 |
-
pipe(messages)
|
9 |
@app.get("/")
|
10 |
def home():
|
11 |
return {"message":"Hello World"}
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from transformers import pipeline
|
3 |
app=FastAPI()
|
4 |
+
pipe = pipeline("text2text-generation", model="openai-community/gpt2")
|
|
|
|
|
|
|
|
|
5 |
@app.get("/")
|
6 |
def home():
|
7 |
return {"message":"Hello World"}
|