Spaces:
Runtime error
Runtime error
Ajay Harikumar
commited on
Commit
·
8db0879
1
Parent(s):
4dd5454
Update README with YAML config
Browse files
README.md
CHANGED
@@ -1,2 +1,11 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Colorize
|
3 |
+
emoji: 🌟
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: purple
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 3.4
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: mit
|
11 |
+
---
|
app.py
CHANGED
@@ -7,13 +7,13 @@ from datetime import datetime
|
|
7 |
|
8 |
model = hub.Module(name='deoldify')
|
9 |
# NOTE: Max is 45 with 11GB video cards. 35 is a good default
|
10 |
-
render_factor=
|
11 |
|
12 |
|
13 |
def colorize_image(image):
|
14 |
# now = datetime.now().strftime("%Y%m%d-%H%M%S-%f")
|
15 |
-
|
16 |
-
|
17 |
# if image is not None:
|
18 |
# image.convert("RGB").save(f"./output/{now}-input.jpg")
|
19 |
model.predict(image.name)
|
@@ -35,4 +35,4 @@ def run_code():
|
|
35 |
create_interface()
|
36 |
|
37 |
# The main function
|
38 |
-
run_code()
|
|
|
7 |
|
8 |
model = hub.Module(name='deoldify')
|
9 |
# NOTE: Max is 45 with 11GB video cards. 35 is a good default
|
10 |
+
render_factor=30
|
11 |
|
12 |
|
13 |
def colorize_image(image):
|
14 |
# now = datetime.now().strftime("%Y%m%d-%H%M%S-%f")
|
15 |
+
if not os.path.exists("./output"):
|
16 |
+
os.makedirs("./output")
|
17 |
# if image is not None:
|
18 |
# image.convert("RGB").save(f"./output/{now}-input.jpg")
|
19 |
model.predict(image.name)
|
|
|
35 |
create_interface()
|
36 |
|
37 |
# The main function
|
38 |
+
run_code()
|