Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def load_model(model_name):
|
|
| 37 |
with warnings.catch_warnings():
|
| 38 |
warnings.simplefilter("ignore")
|
| 39 |
access_token = os.getenv("HF_ACCESS_TOKEN") # Use an environment variable for the access token
|
| 40 |
-
return pipeline("text-generation", model=model_name, framework="tf",
|
| 41 |
|
| 42 |
|
| 43 |
# Button to run the model
|
|
|
|
| 37 |
with warnings.catch_warnings():
|
| 38 |
warnings.simplefilter("ignore")
|
| 39 |
access_token = os.getenv("HF_ACCESS_TOKEN") # Use an environment variable for the access token
|
| 40 |
+
return pipeline("text-generation", model=model_name, framework="tf", token=access_token) # Use TensorFlow framework
|
| 41 |
|
| 42 |
|
| 43 |
# Button to run the model
|