sim-so commited on
Commit
f10c922
1 Parent(s): 5cbbf2b

edit app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -141,7 +141,8 @@ with gr.Blocks() as demo:
141
  def update_guesses(cur, i, guessed_words, guesses_df):
142
  if cur.get('guess') and cur['guess'] not in guessed_words:
143
  guessed_words.add(cur['guess'])
144
- cur['sim'] = round(cur['sim'], 2)
 
145
  cur['i'] = i
146
  guesses_df.loc[i] = cur
147
  i += 1
 
141
  def update_guesses(cur, i, guessed_words, guesses_df):
142
  if cur.get('guess') and cur['guess'] not in guessed_words:
143
  guessed_words.add(cur['guess'])
144
+ if cur['sim']:
145
+ cur['sim'] = round(cur['sim'], 2)
146
  cur['i'] = i
147
  guesses_df.loc[i] = cur
148
  i += 1