Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,9 +79,7 @@ def extract_text_from_pdf(file):
|
|
| 79 |
return None, f"PDF reading error: {str(e)}"
|
| 80 |
|
| 81 |
def translate_text(text, target_lang):
|
| 82 |
-
translation_prompt = f"Translate the following text into {target_lang}:
|
| 83 |
-
|
| 84 |
-
{text}"
|
| 85 |
try:
|
| 86 |
response = client.chat.completions.create(
|
| 87 |
model="gpt-3.5-turbo",
|
|
|
|
| 79 |
return None, f"PDF reading error: {str(e)}"
|
| 80 |
|
| 81 |
def translate_text(text, target_lang):
|
| 82 |
+
translation_prompt = f"Translate the following text into {target_lang}:\n\n{text}"
|
|
|
|
|
|
|
| 83 |
try:
|
| 84 |
response = client.chat.completions.create(
|
| 85 |
model="gpt-3.5-turbo",
|