Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -98,9 +98,12 @@ def not_found(e):
|
|
| 98 |
return jsonify({"error": "not found"}), 404
|
| 99 |
|
| 100 |
if __name__ == "__main__":
|
| 101 |
-
# Ensure the database exists before the first request
|
| 102 |
if not os.path.isfile(DATABASE):
|
| 103 |
init_db()
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
return jsonify({"error": "not found"}), 404
|
| 99 |
|
| 100 |
if __name__ == "__main__":
|
|
|
|
| 101 |
if not os.path.isfile(DATABASE):
|
| 102 |
init_db()
|
| 103 |
+
import gradio as gr
|
| 104 |
+
|
| 105 |
+
def status():
|
| 106 |
+
return "Task API is running."
|
| 107 |
+
|
| 108 |
+
demo = gr.Interface(fn=status, inputs=None, outputs="text")
|
| 109 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, debug=False)
|