Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ together.api_key = os.getenv("TOGETHER_API_KEY")
|
|
14 |
def clean_text(text):
|
15 |
"""Cleans extracted text for better processing by the model."""
|
16 |
print("cleaning")
|
|
|
17 |
text = unicodedata.normalize("NFKC", text) # Normalize Unicode characters
|
18 |
text = re.sub(r'\s+', ' ', text).strip() # Remove extra spaces and newlines
|
19 |
text = re.sub(r'[^a-zA-Z0-9.,!?;:\'\"()\-]', ' ', text) # Keep basic punctuation
|
|
|
14 |
def clean_text(text):
|
15 |
"""Cleans extracted text for better processing by the model."""
|
16 |
print("cleaning")
|
17 |
+
print(together.api_key)
|
18 |
text = unicodedata.normalize("NFKC", text) # Normalize Unicode characters
|
19 |
text = re.sub(r'\s+', ' ', text).strip() # Remove extra spaces and newlines
|
20 |
text = re.sub(r'[^a-zA-Z0-9.,!?;:\'\"()\-]', ' ', text) # Keep basic punctuation
|