Spaces:
Running
Running
UniquePratham
commited on
Commit
•
d6cf125
1
Parent(s):
6352a57
Update app.py
Browse files
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=
|
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 |
{
|