yashzambre commited on
Commit
b2c34f9
·
1 Parent(s): 27b5918

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Define a function that performs the operation on the inputs
4
+ def perform_operation(input1, input2):
5
+ # You can perform any operation here. For demonstration, we'll add two numbers.
6
+ result = input1 + input2
7
+ return result
8
+
9
+ # Define the Gradio interface
10
+ iface = gr.Interface(
11
+ fn=perform_operation,
12
+ inputs=[
13
+ gr.inputs.Number(label="Input 1"),
14
+ gr.inputs.Number(label="Input 2")
15
+ ],
16
+ outputs=gr.outputs.Text(label="Result")
17
+ )
18
+
19
+ # Start the Gradio app
20
+ iface.launch()