Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,15 +15,16 @@ def process_pdf(file):
|
|
| 15 |
return f"Error processing PDF: {str(e)}"
|
| 16 |
|
| 17 |
|
|
|
|
| 18 |
def initialize_llm():
|
| 19 |
groq_api_key = os.environ.get("GROQ_API_KEY")
|
| 20 |
if not groq_api_key:
|
| 21 |
raise ValueError("GROQ_API_KEY environment variable not set.")
|
| 22 |
|
| 23 |
-
|
| 24 |
-
model="mixtral-8x7b-32768",
|
| 25 |
temperature=0.7,
|
| 26 |
-
api_key=
|
| 27 |
)
|
| 28 |
def create_prompt():
|
| 29 |
examples = [
|
|
|
|
| 15 |
return f"Error processing PDF: {str(e)}"
|
| 16 |
|
| 17 |
|
| 18 |
+
|
| 19 |
def initialize_llm():
|
| 20 |
groq_api_key = os.environ.get("GROQ_API_KEY")
|
| 21 |
if not groq_api_key:
|
| 22 |
raise ValueError("GROQ_API_KEY environment variable not set.")
|
| 23 |
|
| 24 |
+
return ChatGroq(
|
| 25 |
+
model="mixtral-8x7b-32768",
|
| 26 |
temperature=0.7,
|
| 27 |
+
api_key=groq_api_key
|
| 28 |
)
|
| 29 |
def create_prompt():
|
| 30 |
examples = [
|