Tulika2000 commited on
Commit
7336bfc
·
verified ·
1 Parent(s): dcc2356

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,8 +17,8 @@ GROQ_API_KEY = os.getenv("GROQ_API_KEY") # Fetch from environment variables
17
  if not GROQ_API_KEY:
18
  raise ValueError("GROQ_API_KEY is not set. Add it in Hugging Face Secrets.")
19
 
20
- # Initialize LLM (Mistral-8x7B)
21
- llm = ChatGroq(model_name="mixtral-8x7b-32768")
22
 
23
  def extract_text_from_pdf(pdf_file):
24
  """Extracts clean text from a text-based PDF while handling edge cases."""
@@ -38,7 +38,7 @@ def extract_text_from_pdf(pdf_file):
38
  return text.strip()
39
 
40
  def summarize_text(text, length, style):
41
- """Summarizes extracted text using Mistral-8x7B with structured formatting."""
42
  prompt = (
43
  f"""
44
  Read the following document and summarize it in {style.lower()} format.
 
17
  if not GROQ_API_KEY:
18
  raise ValueError("GROQ_API_KEY is not set. Add it in Hugging Face Secrets.")
19
 
20
+ # Initialize LLM
21
+ llm = ChatGroq(model_name="llama-3.3-70b-versatile")
22
 
23
  def extract_text_from_pdf(pdf_file):
24
  """Extracts clean text from a text-based PDF while handling edge cases."""
 
38
  return text.strip()
39
 
40
  def summarize_text(text, length, style):
41
+ """Summarizes extracted text with structured formatting."""
42
  prompt = (
43
  f"""
44
  Read the following document and summarize it in {style.lower()} format.