vonliechti commited on
Commit
5adb1e9
·
verified ·
1 Parent(s): 014180e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -13,7 +13,10 @@ load_dotenv()
13
  sessions_path = "sessions.pkl"
14
  sessions = pickle.load(open(sessions_path, "rb")) if os.path.exists(sessions_path) else {}
15
 
16
- agent = get_agent(model_name="meta-llama/Meta-Llama-3.1-8B-Instruct", include_image_tools=True)
 
 
 
17
 
18
  app = None
19
 
 
13
  sessions_path = "sessions.pkl"
14
  sessions = pickle.load(open(sessions_path, "rb")) if os.path.exists(sessions_path) else {}
15
 
16
+ # If currently hosted on HuggingFace Spaces, use the default model, otherwise use the local model
17
+ model_name = "meta-llama/Meta-Llama-3.1-8B-Instruct" if os.getenv("SPACE_ID") is not None else "http://localhost:1234/v1"
18
+
19
+ agent = get_agent(model_name=model_name, include_image_tools=True)
20
 
21
  app = None
22