hamnamughal commited on
Commit
8d99d3b
·
verified ·
1 Parent(s): d16298b

Update health_tracker_agent.py

Browse files
Files changed (1) hide show
  1. health_tracker_agent.py +7 -2
health_tracker_agent.py CHANGED
@@ -1,9 +1,14 @@
 
1
  from transformers import AutoTokenizer, AutoModelForCausalLM
2
  from huggingface_hub import login
3
 
4
  def track_health_status(input_text: str) -> str:
5
- # Authenticate
6
- login("your_huggingface_token_here") # <-- replace with your actual token
 
 
 
 
7
 
8
  model_name = "m42-health/med42-70b"
9
 
 
1
+ import os
2
  from transformers import AutoTokenizer, AutoModelForCausalLM
3
  from huggingface_hub import login
4
 
5
  def track_health_status(input_text: str) -> str:
6
+ # Get token from environment variable
7
+ hf_token = os.getenv("HF_TOKEN")
8
+ if not hf_token:
9
+ raise ValueError("Hugging Face token not set in environment variable 'HF_TOKEN'")
10
+
11
+ login(hf_token)
12
 
13
  model_name = "m42-health/med42-70b"
14