Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/yifan0sun/BERTGradGraph
Browse files
server.py
CHANGED
@@ -61,8 +61,6 @@ class PredModelRequest(BaseModel):
|
|
61 |
def ping():
|
62 |
return {"message": "pong"}
|
63 |
|
64 |
-
|
65 |
-
|
66 |
|
67 |
def zip_if_needed(src_dir, zip_path):
|
68 |
if os.path.exists(zip_path):
|
@@ -152,6 +150,17 @@ def copy_and_extract():
|
|
152 |
|
153 |
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
|
157 |
|
|
|
61 |
def ping():
|
62 |
return {"message": "pong"}
|
63 |
|
|
|
|
|
64 |
|
65 |
def zip_if_needed(src_dir, zip_path):
|
66 |
if os.path.exists(zip_path):
|
|
|
150 |
|
151 |
|
152 |
|
153 |
+
@app.get("/data_check")
|
154 |
+
def data_check():
|
155 |
+
with open("/data/marker.txt", "w") as f:
|
156 |
+
f.write("hello from server.py\n")
|
157 |
+
|
158 |
+
files = os.listdir("/data")
|
159 |
+
return {
|
160 |
+
"message": "done",
|
161 |
+
"contents": files
|
162 |
+
}
|
163 |
+
|
164 |
|
165 |
|
166 |
|