Spaces:
Runtime error
Runtime error
update hugginghub
Browse files
app.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
| 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 |
# This function will be able to generate text
|
| 9 |
# given an input.
|
|
|
|
| 10 |
pipe = pipeline("text2text-generation",
|
| 11 |
model="visoc/Text2Question",use_auth_token=True)
|
| 12 |
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from huggingface_hub import login
|
| 4 |
# Create a new FastAPI app instance
|
| 5 |
app = FastAPI()
|
| 6 |
|
| 7 |
# Initialize the text generation pipeline
|
| 8 |
# This function will be able to generate text
|
| 9 |
# given an input.
|
| 10 |
+
login(token="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")
|
| 11 |
pipe = pipeline("text2text-generation",
|
| 12 |
model="visoc/Text2Question",use_auth_token=True)
|
| 13 |
|