Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
return "Welcome to the Python API!"
|
9 |
-
|
10 |
-
@app.route('/predict', methods=['POST'])
|
11 |
-
def predict():
|
12 |
-
data = request.json
|
13 |
-
# Here you would include your model prediction logic
|
14 |
-
return jsonify({"prediction": "some result"})
|
15 |
-
|
16 |
-
if __name__ == '__main__':
|
17 |
-
app.run(host='0.0.0.0', port=8000)
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
|
3 |
+
app = FastAPI()
|
4 |
+
|
5 |
+
@app.get("/")
|
6 |
+
def read_root():
|
7 |
+
return {"Hello": "World!"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|