Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,16 @@ def check_gpu():
|
|
| 14 |
return gpu_info
|
| 15 |
return {"GPU Disponible": False}
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
class LlamaDemo:
|
| 18 |
def __init__(self):
|
| 19 |
self.model_name = "meta-llama/Llama-2-7b-chat-hf"
|
|
|
|
| 14 |
return gpu_info
|
| 15 |
return {"GPU Disponible": False}
|
| 16 |
|
| 17 |
+
# Configurar autenticaci贸n
|
| 18 |
+
def setup_auth():
|
| 19 |
+
if 'HUGGING_FACE_TOKEN' in st.secrets:
|
| 20 |
+
login(st.secrets['HUGGING_FACE_TOKEN'])
|
| 21 |
+
return True
|
| 22 |
+
else:
|
| 23 |
+
st.error("No se encontr贸 el token de Hugging Face en los secrets")
|
| 24 |
+
st.stop()
|
| 25 |
+
return False
|
| 26 |
+
|
| 27 |
class LlamaDemo:
|
| 28 |
def __init__(self):
|
| 29 |
self.model_name = "meta-llama/Llama-2-7b-chat-hf"
|