Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,10 +31,9 @@ def read_document(file):
|
|
31 |
print(f"Error processing file: {file.name} - {str(e)}")
|
32 |
return f"Error processing file: {file.name} - {str(e)}"
|
33 |
|
34 |
-
#
|
35 |
-
|
36 |
-
|
37 |
-
client = Groq()
|
38 |
|
39 |
# Function to validate and truncate content to prevent API errors
|
40 |
def validate_content(text):
|
|
|
31 |
print(f"Error processing file: {file.name} - {str(e)}")
|
32 |
return f"Error processing file: {file.name} - {str(e)}"
|
33 |
|
34 |
+
# Pass your API key directly when initializing the Groq client
|
35 |
+
api_key = "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" # Replace with your actual API key
|
36 |
+
client = Groq(api_key=api_key)
|
|
|
37 |
|
38 |
# Function to validate and truncate content to prevent API errors
|
39 |
def validate_content(text):
|