Akashpb13 commited on
Commit
7fcb838
·
verified ·
1 Parent(s): 8704f96

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -55,8 +55,8 @@ from datetime import datetime
55
 
56
  #====================================SETUP=====================================#
57
  # Fetch secrets from Hugging Face Spaces
58
- api_key = config.get("API_KEY")
59
- endpoint = config.get("OPENAI_API_BASE")
60
  llama_api_key = os.environ['GROQ_API_KEY']
61
  MEM0_api_key = os.environ['mem0']
62
 
@@ -519,8 +519,8 @@ class NutritionBot:
519
  # Initialize the OpenAI client using the provided credentials
520
  self.client = ChatOpenAI(
521
  model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
522
- api_key=config.get("API_KEY"), # API key for authentication
523
- base_url = config.get("OPENAI_API_BASE"),
524
  temperature=0 # Controls randomness in responses; 0 ensures deterministic results
525
  )
526
 
 
55
 
56
  #====================================SETUP=====================================#
57
  # Fetch secrets from Hugging Face Spaces
58
+ api_key = os.environ["API_KEY"]
59
+ endpoint = os.environ["OPENAI_API_BASE"]
60
  llama_api_key = os.environ['GROQ_API_KEY']
61
  MEM0_api_key = os.environ['mem0']
62
 
 
519
  # Initialize the OpenAI client using the provided credentials
520
  self.client = ChatOpenAI(
521
  model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
522
+ api_key=os.environ["OPENAI_API_BASE"], # API key for authentication
523
+ base_url = os.environ["OPENAI_API_BASE"],
524
  temperature=0 # Controls randomness in responses; 0 ensures deterministic results
525
  )
526