Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def hf_inference_translate(prompt="Wie kann ich Ihnen helfen?", target_language
|
|
81 |
# Call the respective API methods
|
82 |
# Get the input language
|
83 |
chat_response_languagedetected = ""
|
84 |
-
chat_response_languagedetected = api.language_detection(
|
85 |
print(chat_response_languagedetected[0][0]['label'])
|
86 |
# Translate based on input prompt, detected language and chosen target language
|
87 |
text_translation_response = api.text_translation(prompt, chat_response_languagedetected[0][0]['label'], target_language)
|
|
|
81 |
# Call the respective API methods
|
82 |
# Get the input language
|
83 |
chat_response_languagedetected = ""
|
84 |
+
chat_response_languagedetected = api.language_detection(prompt)
|
85 |
print(chat_response_languagedetected[0][0]['label'])
|
86 |
# Translate based on input prompt, detected language and chosen target language
|
87 |
text_translation_response = api.text_translation(prompt, chat_response_languagedetected[0][0]['label'], target_language)
|