Spaces:
Sleeping
Sleeping
brandyguillory
commited on
Commit
•
6133325
1
Parent(s):
a29d142
Update app.py
Browse files
app.py
CHANGED
@@ -26,10 +26,8 @@ user_input = st.text_area("Enter your text prompt:", "Type something here...")
|
|
26 |
# Load the selected model using the pipeline
|
27 |
@st.cache_resource
|
28 |
def load_model(model_name):
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
with warnings.catch_warnings():
|
33 |
warnings.simplefilter("ignore")
|
34 |
access_token = os.getenv("HF_ACCESS_TOKEN") # Use an environment variable for the access token
|
35 |
return pipeline("text-generation", model=model_name, framework="tf", use_auth_token=access_token) # Use TensorFlow framework
|
|
|
26 |
# Load the selected model using the pipeline
|
27 |
@st.cache_resource
|
28 |
def load_model(model_name):
|
29 |
+
# return pipeline("text-generation", model=model_name, framework="tf")
|
30 |
+
with warnings.catch_warnings():
|
|
|
|
|
31 |
warnings.simplefilter("ignore")
|
32 |
access_token = os.getenv("HF_ACCESS_TOKEN") # Use an environment variable for the access token
|
33 |
return pipeline("text-generation", model=model_name, framework="tf", use_auth_token=access_token) # Use TensorFlow framework
|