Chris4K commited on
Commit
c46ee0f
1 Parent(s): 1bbaedf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(text)
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)