Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7c048f9
1
Parent(s):
c93f0a4
TTTTTTT
Browse files
app.py
CHANGED
|
@@ -9,6 +9,8 @@ import torch
|
|
| 9 |
import torch.backends.cudnn
|
| 10 |
import admin.settings as ws_settings
|
| 11 |
import os
|
|
|
|
|
|
|
| 12 |
# os.environ["CUDA_VISIBLE_DEVICES"] = "7"
|
| 13 |
# os.environ["OPENAI_LOGDIR"] = "./logs"
|
| 14 |
# os.environ["MPI_DISABLED"] = "1"
|
|
@@ -390,7 +392,12 @@ if __name__ == '__main__':
|
|
| 390 |
filename=f"examples/{name}",
|
| 391 |
token=token
|
| 392 |
)]
|
| 393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
|
| 395 |
print(example_img_list)
|
| 396 |
EXAMPLES = [
|
|
|
|
| 9 |
import torch.backends.cudnn
|
| 10 |
import admin.settings as ws_settings
|
| 11 |
import os
|
| 12 |
+
import shutil
|
| 13 |
+
from pathlib import Path
|
| 14 |
# os.environ["CUDA_VISIBLE_DEVICES"] = "7"
|
| 15 |
# os.environ["OPENAI_LOGDIR"] = "./logs"
|
| 16 |
# os.environ["MPI_DISABLED"] = "1"
|
|
|
|
| 392 |
filename=f"examples/{name}",
|
| 393 |
token=token
|
| 394 |
)]
|
| 395 |
+
# 复制到当前工作目录下
|
| 396 |
+
dest_path = Path("examples") / name
|
| 397 |
+
dest_path.parent.mkdir(exist_ok=True)
|
| 398 |
+
shutil.copy(local_path, dest_path)
|
| 399 |
+
example_img_list.append([str(dest_path)])
|
| 400 |
+
# example_img_list.append(local_path)
|
| 401 |
|
| 402 |
print(example_img_list)
|
| 403 |
EXAMPLES = [
|