Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
@@ -1,18 +1,4 @@
|
|
1 |
-
from
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
@app.route('/')
|
6 |
-
def index():
|
7 |
-
return "Welcome to the AI application!"
|
8 |
-
|
9 |
-
@app.route('/predict', methods=['POST'])
|
10 |
-
def predict():
|
11 |
-
data = request.json
|
12 |
-
text = data.get('text')
|
13 |
-
# Example prediction logic
|
14 |
-
result = "example result" # Replace with actual model prediction logic
|
15 |
-
return jsonify({'prediction': result})
|
16 |
-
|
17 |
-
if __name__ == "__main__":
|
18 |
-
app.run(debug=True)
|
|
|
1 |
+
from app import app
|
2 |
|
3 |
+
if __name__ == '__main__':
|
4 |
+
app.run(host='0.0.0.0', port=5000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|