Spaces:
Running
on
Zero
Running
on
Zero
da03
commited on
Commit
•
d1a789b
1
Parent(s):
fe5b36f
app.py
CHANGED
@@ -91,15 +91,15 @@ def predict_product(num1, num2):
|
|
91 |
predicted_annotations = []
|
92 |
is_correct_sofar = True
|
93 |
if model_name == 'implicit':
|
94 |
-
|
95 |
-
|
96 |
predicted_annotations = [(predicted_digit, None) for predicted_digit in predicted_digits_reversed]
|
97 |
predicted_digits_reversed = []
|
98 |
else:
|
99 |
-
|
100 |
-
|
101 |
-
predicted_annotations = [(predicted_digit, None) for predicted_digit in predicted_digits_reversed[:
|
102 |
-
predicted_digits_reversed = predicted_digits_reversed[
|
103 |
|
104 |
for i in range(len(predicted_digits_reversed)):
|
105 |
predicted_digit = predicted_digits_reversed[i]
|
|
|
91 |
predicted_annotations = []
|
92 |
is_correct_sofar = True
|
93 |
if model_name == 'implicit':
|
94 |
+
if '=' not in predicted_digits_reversed:
|
95 |
+
print ('aaa')
|
96 |
predicted_annotations = [(predicted_digit, None) for predicted_digit in predicted_digits_reversed]
|
97 |
predicted_digits_reversed = []
|
98 |
else:
|
99 |
+
print ('bbbaaa')
|
100 |
+
equal_sign_position = predicted_digits_reversed.index('=')
|
101 |
+
predicted_annotations = [(predicted_digit, None) for predicted_digit in predicted_digits_reversed[:equal_sign_position+1]]
|
102 |
+
predicted_digits_reversed = predicted_digits_reversed[equal_sign_position+1:]
|
103 |
|
104 |
for i in range(len(predicted_digits_reversed)):
|
105 |
predicted_digit = predicted_digits_reversed[i]
|