Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -287,7 +287,6 @@ async def extract_text_from_file(file: UploadFile) -> str:
|
|
| 287 |
logger.info(f"Processing file: {filename}, size: {len(content)} bytes, MIME type: {mime_type}")
|
| 288 |
|
| 289 |
try:
|
| 290 |
-
suc
|
| 291 |
# PDF processing with fallback mechanisms
|
| 292 |
if mime_type == 'application/pdf' or filename.endswith('.pdf'):
|
| 293 |
try:
|
|
@@ -666,7 +665,7 @@ async def generate_creative_text(prompt: str) -> str:
|
|
| 666 |
"temperature": 0.8,
|
| 667 |
"top_p": 0.95,
|
| 668 |
"top_k": 40,
|
| 669 |
-
"max_output_tokens": 1024
|
| 670 |
}
|
| 671 |
|
| 672 |
# Call the Gemini model
|
|
|
|
| 287 |
logger.info(f"Processing file: {filename}, size: {len(content)} bytes, MIME type: {mime_type}")
|
| 288 |
|
| 289 |
try:
|
|
|
|
| 290 |
# PDF processing with fallback mechanisms
|
| 291 |
if mime_type == 'application/pdf' or filename.endswith('.pdf'):
|
| 292 |
try:
|
|
|
|
| 665 |
"temperature": 0.8,
|
| 666 |
"top_p": 0.95,
|
| 667 |
"top_k": 40,
|
| 668 |
+
"max_output_tokens": 1024
|
| 669 |
}
|
| 670 |
|
| 671 |
# Call the Gemini model
|