Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ from groq import Groq
|
|
| 66 |
from mem0 import MemoryClient
|
| 67 |
import streamlit as st
|
| 68 |
from datetime import datetime
|
| 69 |
-
|
| 70 |
|
| 71 |
#====================================SETUP=====================================#
|
| 72 |
# Fetch secrets from Hugging Face Spaces
|
|
@@ -989,8 +989,8 @@ class NutritionBot:
|
|
| 989 |
# Initialize the OpenAI client using the provided credentials
|
| 990 |
self.client = ChatOpenAI(
|
| 991 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
| 992 |
-
api_key=
|
| 993 |
-
openai_api_base =
|
| 994 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 995 |
)
|
| 996 |
|
|
|
|
| 66 |
from mem0 import MemoryClient
|
| 67 |
import streamlit as st
|
| 68 |
from datetime import datetime
|
| 69 |
+
from google.colab import userdata
|
| 70 |
|
| 71 |
#====================================SETUP=====================================#
|
| 72 |
# Fetch secrets from Hugging Face Spaces
|
|
|
|
| 989 |
# Initialize the OpenAI client using the provided credentials
|
| 990 |
self.client = ChatOpenAI(
|
| 991 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
| 992 |
+
api_key=os.environ["API_KEY"], # API key for authentication
|
| 993 |
+
openai_api_base = os.environ["OPENAI_API_BASE"],
|
| 994 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 995 |
)
|
| 996 |
|