Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import os
|
|
| 6 |
|
| 7 |
# Load Groq API key securely
|
| 8 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "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")
|
| 9 |
-
GROQ_MODEL = "
|
| 10 |
GROQ_ENDPOINT = "https://api.groq.com/openai/v1/chat/completions"
|
| 11 |
|
| 12 |
def extract_text_from_image(image):
|
|
@@ -25,9 +25,9 @@ def analyze_with_groq(text):
|
|
| 25 |
prompt = (
|
| 26 |
"You are a medical assistant. Analyze the following prescription text (which may be in English and Sindhi):\n\n"
|
| 27 |
f"{text}\n\n"
|
| 28 |
-
"Identify medications and
|
| 29 |
-
"1.
|
| 30 |
-
"2.
|
| 31 |
"3. Food interaction alerts\n"
|
| 32 |
)
|
| 33 |
|
|
|
|
| 6 |
|
| 7 |
# Load Groq API key securely
|
| 8 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "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")
|
| 9 |
+
GROQ_MODEL = "llama-3.3-70b-versatile" # Updated to supported model
|
| 10 |
GROQ_ENDPOINT = "https://api.groq.com/openai/v1/chat/completions"
|
| 11 |
|
| 12 |
def extract_text_from_image(image):
|
|
|
|
| 25 |
prompt = (
|
| 26 |
"You are a medical assistant. Analyze the following prescription text (which may be in English and Sindhi):\n\n"
|
| 27 |
f"{text}\n\n"
|
| 28 |
+
"Identify medications and provide:\n"
|
| 29 |
+
"1. Purpose of each medicine\n"
|
| 30 |
+
"2. Suggested reminder schedule\n"
|
| 31 |
"3. Food interaction alerts\n"
|
| 32 |
)
|
| 33 |
|