yoon-gu commited on
Commit
4c88e5f
β€’
1 Parent(s): a1b291d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -114,11 +114,12 @@ with gr.Blocks() as demo:
114
  info[user]['done'] = True
115
  else:
116
  hint1 = ""
117
- for x, y in zip(message, answer.value):
118
- if x == y:
119
- hint1 += x
120
- else:
121
- hint1 += "X"
 
122
  bot_message = f"***{message}***!? 🧐 λ‹€μ‹œ ν•œλ²ˆ μƒκ°ν•΄λ³΄μ„Έμš”.\n힌트: {hint1}"
123
  info[user]['score'] -= 0.1
124
 
 
114
  info[user]['done'] = True
115
  else:
116
  hint1 = ""
117
+ for i, y in enumerate(answer.value):
118
+ if i < len(message):
119
+ if message[i] == y:
120
+ hint1 += y
121
+ else:
122
+ hint1 += "X"
123
  bot_message = f"***{message}***!? 🧐 λ‹€μ‹œ ν•œλ²ˆ μƒκ°ν•΄λ³΄μ„Έμš”.\n힌트: {hint1}"
124
  info[user]['score'] -= 0.1
125