Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,8 @@ user_input = st.text_area("Enter your text prompt:", "Type something here...")
|
|
35 |
def load_model(model_name):
|
36 |
with warnings.catch_warnings():
|
37 |
warnings.simplefilter("ignore")
|
38 |
-
|
39 |
-
|
40 |
|
41 |
|
42 |
# Button to run the model
|
|
|
35 |
def load_model(model_name):
|
36 |
with warnings.catch_warnings():
|
37 |
warnings.simplefilter("ignore")
|
38 |
+
access_token = os.getenv("HF_ACCESS_TOKEN") # Use an environment variable for the access token
|
39 |
+
return pipeline("text-generation", model=model_name, framework="tf", use_auth_token=access_token) # Use TensorFlow framework
|
40 |
|
41 |
|
42 |
# Button to run the model
|