yetessam commited on
Commit
f8c087a
·
verified ·
1 Parent(s): 116fe2e

Update agents/model.py

Browse files
Files changed (1) hide show
  1. 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
- return my_id
11
- else:
12
- print("Substring not found!")
13
- return prefix + my_id
 
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
+