samith-a commited on
Commit
e3d6072
·
1 Parent(s): 8f7de6d

test deploy

Browse files
Files changed (1) hide show
  1. app.py +6 -14
app.py CHANGED
@@ -1,17 +1,9 @@
1
- # app.py
2
- from fastapi import FastAPI
3
 
4
- app = FastAPI()
 
5
 
6
- @app.on_event("startup")
7
- def on_startup():
8
- print("✅ Space is live!")
9
 
10
- @app.get("/ping")
11
- def ping():
12
- return {"ping": "pong"}
13
-
14
- @app.post("/predict")
15
- def predict(payload: dict):
16
- # Echo back whatever JSON you send
17
- return {"received": payload}
 
1
+ import gradio as gr
 
2
 
3
+ def add(x, y):
4
+ return x + y
5
 
6
+ # Interface: define inputs and outputs
7
+ app = gr.Interface(fn=add, inputs=["number", "number"], outputs="number")
 
8
 
9
+ app.launch()