Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
•
89d08ae
1
Parent(s):
2b1b4f1
app.py
CHANGED
@@ -41,8 +41,8 @@ def predict_product(num1, num2):
|
|
41 |
if valid_input:
|
42 |
correct_product = num1_int * num2_int
|
43 |
try:
|
44 |
-
|
45 |
-
is_correct = (
|
46 |
except ValueError:
|
47 |
is_correct = False
|
48 |
result_color = "green" if is_correct else "red"
|
|
|
41 |
if valid_input:
|
42 |
correct_product = num1_int * num2_int
|
43 |
try:
|
44 |
+
prediction_int = int(prediction)
|
45 |
+
is_correct = (prediction_int == correct_product)
|
46 |
except ValueError:
|
47 |
is_correct = False
|
48 |
result_color = "green" if is_correct else "red"
|