Spaces:
Runtime error
Runtime error
init
Browse files
app.py
CHANGED
|
@@ -15,7 +15,9 @@ import numpy as np
|
|
| 15 |
import PIL.Image
|
| 16 |
|
| 17 |
from io import BytesIO
|
|
|
|
| 18 |
|
|
|
|
| 19 |
|
| 20 |
ORIGINAL_REPO_URL = 'https://github.com/TachibanaYoshino/AnimeGANv2'
|
| 21 |
TITLE = 'TachibanaYoshino/AnimeGANv2'
|
|
@@ -48,6 +50,12 @@ def run(
|
|
| 48 |
image,
|
| 49 |
) -> tuple[PIL.Image.Image]:
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
return PIL.Image.open(image.name)
|
| 53 |
|
|
|
|
| 15 |
import PIL.Image
|
| 16 |
|
| 17 |
from io import BytesIO
|
| 18 |
+
sys.path.insert(0, 'animeganv2')
|
| 19 |
|
| 20 |
+
import test as test
|
| 21 |
|
| 22 |
ORIGINAL_REPO_URL = 'https://github.com/TachibanaYoshino/AnimeGANv2'
|
| 23 |
TITLE = 'TachibanaYoshino/AnimeGANv2'
|
|
|
|
| 50 |
image,
|
| 51 |
) -> tuple[PIL.Image.Image]:
|
| 52 |
|
| 53 |
+
curPath = os.path.abspath(os.path.dirname(__file__))
|
| 54 |
+
checkpoint_dir = os.path.join(curPath, 'animeganv2/checkpoint/generator_Shinkai_weight')
|
| 55 |
+
print(checkpoint_dir)
|
| 56 |
+
|
| 57 |
+
test.test(checkpoint_dir, 'save_dir', image.name, True)
|
| 58 |
+
|
| 59 |
|
| 60 |
return PIL.Image.open(image.name)
|
| 61 |
|