Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def handle(
|
|
| 26 |
csv_path = os.path.join(SAVE_CSV_DIR, filename)
|
| 27 |
data = pd.read_csv(csv_path)
|
| 28 |
for idx in range(len(data) // 100):
|
| 29 |
-
if idx <=
|
| 30 |
continue;
|
| 31 |
begin_idx = idx * 100
|
| 32 |
end_idx = idx * 100 + 100
|
|
@@ -68,19 +68,6 @@ with gr.Blocks() as demo:
|
|
| 68 |
outputs=None
|
| 69 |
)
|
| 70 |
|
| 71 |
-
import time
|
| 72 |
-
import subprocess
|
| 73 |
-
|
| 74 |
-
MAX_TIME = 100
|
| 75 |
-
cur_time = 0
|
| 76 |
-
|
| 77 |
-
while cur_time < MAX_TIME:
|
| 78 |
-
cur_time += 1
|
| 79 |
-
uninstall_cmd = ['pip', 'uninstall', '-y', 'ml4co-kit==0.0.1']
|
| 80 |
-
subprocess.run(uninstall_cmd)
|
| 81 |
-
install_cmd = ['pip', 'install', '--no-cache-dir', 'ml4co-kit']
|
| 82 |
-
subprocess.run(install_cmd)
|
| 83 |
-
time.sleep(1)
|
| 84 |
|
| 85 |
if __name__ == "__main__":
|
| 86 |
demo.launch(debug = True)
|
|
|
|
| 26 |
csv_path = os.path.join(SAVE_CSV_DIR, filename)
|
| 27 |
data = pd.read_csv(csv_path)
|
| 28 |
for idx in range(len(data) // 100):
|
| 29 |
+
if idx <= 18:
|
| 30 |
continue;
|
| 31 |
begin_idx = idx * 100
|
| 32 |
end_idx = idx * 100 + 100
|
|
|
|
| 68 |
outputs=None
|
| 69 |
)
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
if __name__ == "__main__":
|
| 73 |
demo.launch(debug = True)
|