Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import frontend
|
| 2 |
+
import backend
|
| 3 |
+
|
| 4 |
+
# 1. Get the prediction logic from the backend
|
| 5 |
+
prediction_logic = backend.process_and_predict
|
| 6 |
+
|
| 7 |
+
# 2. Pass the logic to the frontend to build the UI
|
| 8 |
+
app = frontend.build_ui(prediction_logic)
|
| 9 |
+
|
| 10 |
+
# 3. Launch the application
|
| 11 |
+
if __name__ == "__main__":
|
| 12 |
+
print("Starting Web Server...")
|
| 13 |
+
app.launch(server_name="0.0.0.0", server_port=7860)
|