Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,9 +88,7 @@ def extract_text_from_pdf(file):
|
|
| 88 |
return None, f"PDF reading error: {str(e)}"
|
| 89 |
|
| 90 |
def translate_text(text, target_lang):
|
| 91 |
-
translation_prompt = f"Translate the following text into {target_lang}:
|
| 92 |
-
|
| 93 |
-
{text}"
|
| 94 |
try:
|
| 95 |
response = client.chat.completions.create(
|
| 96 |
model="gpt-3.5-turbo",
|
|
|
|
| 88 |
return None, f"PDF reading error: {str(e)}"
|
| 89 |
|
| 90 |
def translate_text(text, target_lang):
|
| 91 |
+
translation_prompt = f"Translate the following text into {target_lang}:\n\n{text}"
|
|
|
|
|
|
|
| 92 |
try:
|
| 93 |
response = client.chat.completions.create(
|
| 94 |
model="gpt-3.5-turbo",
|