Spaces:
Sleeping
Sleeping
Update agents/model.py
Browse files- agents/model.py +6 -5
agents/model.py
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
import os
|
| 2 |
|
|
|
|
| 3 |
# You may choose between different models based on availability or requirements
|
| 4 |
def load_huggingface_model():
|
| 5 |
my_id = os.getenv("MODEL_URI")
|
| 6 |
# Your Hugging Face model loading logic here
|
| 7 |
prefix = "https://"
|
| 8 |
|
| 9 |
-
if prefix in my_id:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
+
# Assumption that this secret exists in the current Space's environment
|
| 4 |
# You may choose between different models based on availability or requirements
|
| 5 |
def load_huggingface_model():
|
| 6 |
my_id = os.getenv("MODEL_URI")
|
| 7 |
# Your Hugging Face model loading logic here
|
| 8 |
prefix = "https://"
|
| 9 |
|
| 10 |
+
if not prefix in my_id:
|
| 11 |
+
my_id = prefix + my_id
|
| 12 |
+
|
| 13 |
+
return my_id
|
| 14 |
+
|