Update app.py
Browse files
app.py
CHANGED
|
@@ -16,11 +16,10 @@ user_input = st.text_area("Enter your prompt (e.g., 'Write a Python function to
|
|
| 16 |
# Load the Hugging Face pipeline (code generation)
|
| 17 |
@st.cache_resource
|
| 18 |
def load_model():
|
| 19 |
-
#
|
| 20 |
model = pipeline(
|
| 21 |
"text-generation",
|
| 22 |
-
model="EleutherAI/gpt-neo-1.3B"
|
| 23 |
-
use_auth_token=True # Automatically uses Hugging Face Space's token
|
| 24 |
)
|
| 25 |
return model
|
| 26 |
|
|
|
|
| 16 |
# Load the Hugging Face pipeline (code generation)
|
| 17 |
@st.cache_resource
|
| 18 |
def load_model():
|
| 19 |
+
# Authenticate automatically in Hugging Face Spaces
|
| 20 |
model = pipeline(
|
| 21 |
"text-generation",
|
| 22 |
+
model="EleutherAI/gpt-neo-1.3B" # The model to use
|
|
|
|
| 23 |
)
|
| 24 |
return model
|
| 25 |
|