Spaces:
Sleeping
Sleeping
SHAMIL SHAHBAZ AWAN
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import numpy as np
|
|
| 8 |
from groq import Client # Assuming Groq API client is installed
|
| 9 |
|
| 10 |
# Load Hugging Face Secrets
|
| 11 |
-
HUGGINGFACE_KEY = os.getenv("
|
| 12 |
if not HUGGINGFACE_KEY:
|
| 13 |
st.error("Hugging Face API token not found. Please set it in the Hugging Face Secrets.")
|
| 14 |
|
|
@@ -77,7 +77,7 @@ if user_query:
|
|
| 77 |
st.write(chunk)
|
| 78 |
|
| 79 |
combined_input = " ".join(retrieved_chunks) + user_query
|
| 80 |
-
response = groq_client.generate(model="
|
| 81 |
|
| 82 |
st.subheader("Generated Response")
|
| 83 |
st.write(response["text"])
|
|
|
|
| 8 |
from groq import Client # Assuming Groq API client is installed
|
| 9 |
|
| 10 |
# Load Hugging Face Secrets
|
| 11 |
+
HUGGINGFACE_KEY = os.getenv("HUGGINGFACE_KEY") # Set in Hugging Face Spaces secret manager
|
| 12 |
if not HUGGINGFACE_KEY:
|
| 13 |
st.error("Hugging Face API token not found. Please set it in the Hugging Face Secrets.")
|
| 14 |
|
|
|
|
| 77 |
st.write(chunk)
|
| 78 |
|
| 79 |
combined_input = " ".join(retrieved_chunks) + user_query
|
| 80 |
+
response = groq_client.generate(model="llama3-8b-8192", prompt=combined_input, max_tokens=200)
|
| 81 |
|
| 82 |
st.subheader("Generated Response")
|
| 83 |
st.write(response["text"])
|