Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
#calculation
|
| 4 |
+
def calculate (for_this,this_much,how_much_for_this):
|
| 5 |
+
x = float(for_this)
|
| 6 |
+
y = float(this_much)
|
| 7 |
+
z = float(how_much_for_this)
|
| 8 |
+
|
| 9 |
+
answer = (y/x)*z
|
| 10 |
+
return answer
|
| 11 |
+
|
| 12 |
+
iface = gr.Interface(fn=calculate, inputs=["text", "text", "text"], outputs=["textbox"]).launch(share=True)
|