Spaces:
Running
Running
commit
Browse files
app.py
CHANGED
@@ -14,8 +14,11 @@ class Examples(gr.helpers.Examples):
|
|
14 |
self.create()
|
15 |
|
16 |
|
|
|
|
|
17 |
client = Client("Canyu/Diception",
|
18 |
-
max_workers=3
|
|
|
19 |
|
20 |
|
21 |
def process_image_check(path_input):
|
@@ -26,8 +29,8 @@ def process_image_check(path_input):
|
|
26 |
|
27 |
def infer_image_matting(matting_image_input):
|
28 |
return client.predict(
|
29 |
-
|
30 |
-
api_name="/
|
31 |
)
|
32 |
|
33 |
def clear_cache():
|
|
|
14 |
self.create()
|
15 |
|
16 |
|
17 |
+
HF_TOKEN = os.environ.get('HF_KEY')
|
18 |
+
|
19 |
client = Client("Canyu/Diception",
|
20 |
+
max_workers=3,
|
21 |
+
hf_token=HF_TOKEN)
|
22 |
|
23 |
|
24 |
def process_image_check(path_input):
|
|
|
29 |
|
30 |
def infer_image_matting(matting_image_input):
|
31 |
return client.predict(
|
32 |
+
prompt=handle_file(matting_image_input),
|
33 |
+
api_name="/test"
|
34 |
)
|
35 |
|
36 |
def clear_cache():
|