Update app.py
Browse files
app.py
CHANGED
|
@@ -15,8 +15,17 @@ from pydantic import BaseModel, Field
|
|
| 15 |
from typing import List, Dict
|
| 16 |
groq_api_key = os.getenv("GROQ_API_KEY")
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
if not os.getenv("GROQ_API_KEY"):
|
| 19 |
-
|
| 20 |
#git remote set-url origin https://<user_name>:<token>@huggingface.co/<repo_path>
|
| 21 |
# Define a query condensing template
|
| 22 |
condense_prompt_template = PromptTemplate(
|
|
|
|
| 15 |
from typing import List, Dict
|
| 16 |
groq_api_key = os.getenv("GROQ_API_KEY")
|
| 17 |
|
| 18 |
+
import logging
|
| 19 |
+
|
| 20 |
+
# Configure the logging
|
| 21 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 22 |
+
|
| 23 |
+
# Example log messages
|
| 24 |
+
logging.info("Streamlit app started")
|
| 25 |
+
logging.error("This is an error log")
|
| 26 |
+
|
| 27 |
if not os.getenv("GROQ_API_KEY"):
|
| 28 |
+
logging.info("GROQ API key is missing!")
|
| 29 |
#git remote set-url origin https://<user_name>:<token>@huggingface.co/<repo_path>
|
| 30 |
# Define a query condensing template
|
| 31 |
condense_prompt_template = PromptTemplate(
|