Spaces:
Running
Running
fix passing the custom language
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def extract_wikipedia_content(wiki_url, api_key, model_id, base_url, target_lang
|
|
27 |
Function to extract content from Wikipedia URL (placeholder for now)
|
28 |
"""
|
29 |
# Use custom language if selected
|
30 |
-
if target_lang == "
|
31 |
target_lang = custom_lang
|
32 |
|
33 |
wiki_id = extract_wiki_id(wiki_url)
|
@@ -109,7 +109,7 @@ def translate_section(section_content, article_title, article_summary, content_f
|
|
109 |
return "Please provide content and API key for translation.", None if debug_mode else None
|
110 |
|
111 |
# Use custom language if selected
|
112 |
-
if target_lang == "
|
113 |
actual_lang = custom_lang
|
114 |
else:
|
115 |
actual_lang = target_lang
|
|
|
27 |
Function to extract content from Wikipedia URL (placeholder for now)
|
28 |
"""
|
29 |
# Use custom language if selected
|
30 |
+
if target_lang == "Custom" and custom_lang:
|
31 |
target_lang = custom_lang
|
32 |
|
33 |
wiki_id = extract_wiki_id(wiki_url)
|
|
|
109 |
return "Please provide content and API key for translation.", None if debug_mode else None
|
110 |
|
111 |
# Use custom language if selected
|
112 |
+
if target_lang == "Custom" and custom_lang:
|
113 |
actual_lang = custom_lang
|
114 |
else:
|
115 |
actual_lang = target_lang
|