Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,11 +51,14 @@ def calculator(text1, operation, text2):
|
|
51 |
if operation == "add":
|
52 |
return generator1(text1) + generator2(text2)
|
53 |
elif operation == "subtract":
|
54 |
-
|
|
|
55 |
elif operation == "multiply":
|
56 |
-
|
|
|
57 |
elif operation == "divide":
|
58 |
-
|
|
|
59 |
|
60 |
demo = gr.Interface(
|
61 |
calculator,
|
|
|
51 |
if operation == "add":
|
52 |
return generator1(text1) + generator2(text2)
|
53 |
elif operation == "subtract":
|
54 |
+
output = generator1(text1) + generator2(text2)
|
55 |
+
return output.replace(text1, "").replace(text2, "")
|
56 |
elif operation == "multiply":
|
57 |
+
output = generator1(text1) + generator2(text2) + generator3(text1)
|
58 |
+
return output
|
59 |
elif operation == "divide":
|
60 |
+
output = generator1(text2) + generator2(text1) + generator3(text2)
|
61 |
+
return output.replace(text1, "").replace(text2, "")
|
62 |
|
63 |
demo = gr.Interface(
|
64 |
calculator,
|