Arnaudding001 commited on
Commit
91c207b
1 Parent(s): 65d436e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
 
3
  def convert_to_french_letters(number):
4
- # Define lists of French words for numbers
5
  units = ['', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf']
6
  tens = ['', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingt', 'quatre-vingt-dix']
7
  # Define special cases for 70, 80, and 90
@@ -48,7 +48,7 @@ def convert_to_french_letters(number):
48
  words.append('dix-' + units[tens_and_units-10])
49
  else:
50
  tens_digit = tens[int(tens_and_units / 10)]
51
- units_digit = units[tens_and_units % 10]
52
  if tens_digit == 'vingt' and units_digit == 'un':
53
  tens_digit = 'vingt-et-un'
54
  units_digit = ''
 
1
  import gradio as gr
2
 
3
  def convert_to_french_letters(number):
4
+ # Define lists of French words for numbers
5
  units = ['', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf']
6
  tens = ['', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingt', 'quatre-vingt-dix']
7
  # Define special cases for 70, 80, and 90
 
48
  words.append('dix-' + units[tens_and_units-10])
49
  else:
50
  tens_digit = tens[int(tens_and_units / 10)]
51
+ units_digit = units[int(tens_and_units % 10)]
52
  if tens_digit == 'vingt' and units_digit == 'un':
53
  tens_digit = 'vingt-et-un'
54
  units_digit = ''