Spaces:
No application file
No application file
Create adding
Browse files
adding
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
# Function to add two numbers
|
| 4 |
+
def add_numbers(num1, num2):
|
| 5 |
+
return num1 + num2
|
| 6 |
+
|
| 7 |
+
# Create the Gradio interface
|
| 8 |
+
interface = gr.Interface(fn=add_numbers,
|
| 9 |
+
inputs=["number", "number"],
|
| 10 |
+
outputs="number",
|
| 11 |
+
title="Simple Addition App",
|
| 12 |
+
description="Enter two numbers to get their sum.")
|
| 13 |
+
|
| 14 |
+
# Launch the interface
|
| 15 |
+
interface.launch()
|