BFH commited on
Commit
0ee65aa
·
1 Parent(s): 2c798d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def attribution(text):
30
  # Translate the input in german if necessary
31
  if language == 'fr':
32
  translator = pipeline("translation", model="Helsinki-NLP/opus-mt-fr-de")
33
- translatedText = translator(text)
34
  text = translatedText[0]["translation_text"]
35
 
36
  # Set the bars of the bar chart
 
30
  # Translate the input in german if necessary
31
  if language == 'fr':
32
  translator = pipeline("translation", model="Helsinki-NLP/opus-mt-fr-de")
33
+ translatedText = translator(text[0:511])
34
  text = translatedText[0]["translation_text"]
35
 
36
  # Set the bars of the bar chart