Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,14 @@ def calculator(num1, num2, operation):
|
|
| 41 |
|
| 42 |
iface = gr.Interface(
|
| 43 |
fn=calculator,
|
| 44 |
-
inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
outputs="text",
|
| 46 |
title="Basic Arithmetic Operations",
|
| 47 |
description="Perform basic arithmetic operations: addition, subtraction, multiplication, and division.",
|
|
@@ -51,4 +58,4 @@ gr.mount_gradio_app(app, iface, path="/")
|
|
| 51 |
|
| 52 |
if __name__ == "__main__":
|
| 53 |
import uvicorn
|
| 54 |
-
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 41 |
|
| 42 |
iface = gr.Interface(
|
| 43 |
fn=calculator,
|
| 44 |
+
inputs=[
|
| 45 |
+
gr.inputs.Number(label="Number 1"),
|
| 46 |
+
gr.inputs.Number(label="Number 2"),
|
| 47 |
+
gr.inputs.Dropdown(
|
| 48 |
+
choices=["Addition", "Subtraction", "Multiplication", "Division"],
|
| 49 |
+
label="Operation"
|
| 50 |
+
)
|
| 51 |
+
],
|
| 52 |
outputs="text",
|
| 53 |
title="Basic Arithmetic Operations",
|
| 54 |
description="Perform basic arithmetic operations: addition, subtraction, multiplication, and division.",
|
|
|
|
| 58 |
|
| 59 |
if __name__ == "__main__":
|
| 60 |
import uvicorn
|
| 61 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|