lohanajk-56 commited on
Commit
8959865
·
verified ·
1 Parent(s): 004be2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 = "mixtral-8x7b-32768"
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 give:\n"
29
- "1. What each medicine is for\n"
30
- "2. Reminder schedule\n"
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