UniquePratham commited on
Commit
d6cf125
1 Parent(s): 6352a57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -65,7 +65,7 @@ def clean_extracted_text(text):
65
  def polish_text_with_ai(cleaned_text):
66
  prompt = f"Remove unwanted spaces between and inside words to join incomplete words, creating a meaningful sentence in either Hindi, English, or Hinglish without altering any words from the given extracted text. Then, return the corrected text with adjusted spaces, keeping it as close to the original as possible, along with relevant details or insights that an AI can provide about the extracted text. Extracted Text: {cleaned_text}"
67
  client = Groq(
68
- api_key="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")
69
  chat_completion = client.chat.completions.create(
70
  messages=[
71
  {
 
65
  def polish_text_with_ai(cleaned_text):
66
  prompt = f"Remove unwanted spaces between and inside words to join incomplete words, creating a meaningful sentence in either Hindi, English, or Hinglish without altering any words from the given extracted text. Then, return the corrected text with adjusted spaces, keeping it as close to the original as possible, along with relevant details or insights that an AI can provide about the extracted text. Extracted Text: {cleaned_text}"
67
  client = Groq(
68
+ api_key=os.getenv('GROQ_API_KEY'))
69
  chat_completion = client.chat.completions.create(
70
  messages=[
71
  {