Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -57,8 +57,8 @@ from datetime import datetime
|
|
| 57 |
|
| 58 |
#====================================SETUP=====================================#
|
| 59 |
# Fetch secrets from Hugging Face Spaces
|
| 60 |
-
api_key =
|
| 61 |
-
endpoint =
|
| 62 |
llama_api_key = os.environ['GROQ_API_KEY']
|
| 63 |
MEM0_api_key = os.environ['mem0']
|
| 64 |
|
|
@@ -549,8 +549,8 @@ class NutritionBot:
|
|
| 549 |
# Initialize the OpenAI client using the provided credentials
|
| 550 |
self.client = ChatOpenAI(
|
| 551 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
| 552 |
-
api_key=
|
| 553 |
-
base_url
|
| 554 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 555 |
)
|
| 556 |
|
|
|
|
| 57 |
|
| 58 |
#====================================SETUP=====================================#
|
| 59 |
# Fetch secrets from Hugging Face Spaces
|
| 60 |
+
api_key = os.environ['API_KEY']
|
| 61 |
+
endpoint = os.environ['OPENAI_API_BASE']
|
| 62 |
llama_api_key = os.environ['GROQ_API_KEY']
|
| 63 |
MEM0_api_key = os.environ['mem0']
|
| 64 |
|
|
|
|
| 549 |
# Initialize the OpenAI client using the provided credentials
|
| 550 |
self.client = ChatOpenAI(
|
| 551 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
| 552 |
+
api_key=os.environ['API_KEY'],
|
| 553 |
+
base_url=os.environ['OPENAI_API_BASE'],
|
| 554 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 555 |
)
|
| 556 |
|