Spaces:
Paused
Paused
kingabzpro
commited on
Commit
·
8d19b59
1
Parent(s):
e275158
Update app/app_savta.py
Browse files- app/app_savta.py +16 -2
app/app_savta.py
CHANGED
@@ -73,13 +73,27 @@ examples = [
|
|
73 |
favicon = "examples/favicon.ico"
|
74 |
thumbnail = "examples/SavtaDepth.png"
|
75 |
|
76 |
-
def
|
77 |
|
78 |
return PILImageBW.create((learner.predict(input_img))[0]).convert('L')
|
79 |
|
80 |
|
81 |
def main():
|
82 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
iface.launch(enable_queue=True)
|
85 |
# enable_queue=True,auth=("admin", "pass1234")
|
|
|
73 |
favicon = "examples/favicon.ico"
|
74 |
thumbnail = "examples/SavtaDepth.png"
|
75 |
|
76 |
+
def gen(input_img):
|
77 |
|
78 |
return PILImageBW.create((learner.predict(input_img))[0]).convert('L')
|
79 |
|
80 |
|
81 |
def main():
|
82 |
+
iface = gr.Interface(
|
83 |
+
gen,
|
84 |
+
gr.inputs.Image(shape=(640,480),type='numpy'),
|
85 |
+
"image",
|
86 |
+
title = title,
|
87 |
+
flagging_options=["incorrect", "worst","ambiguous"],
|
88 |
+
allow_flagging = "manual",
|
89 |
+
flagging_callback=hf_writer,
|
90 |
+
description = description,
|
91 |
+
article = article,
|
92 |
+
examples = examples,
|
93 |
+
theme ="peach",
|
94 |
+
thumbnail=thumbnail,
|
95 |
+
allow_screenshot=True
|
96 |
+
)
|
97 |
|
98 |
iface.launch(enable_queue=True)
|
99 |
# enable_queue=True,auth=("admin", "pass1234")
|