Spaces:
Runtime error
Runtime error
Update file path
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def reset_last(state):
|
|
75 |
|
76 |
def save_image_to_local(image: Image.Image):
|
77 |
# TODO(jykoh): Update so the url path is used, to prevent repeat saving.
|
78 |
-
filename = next(tempfile._get_candidate_names()) + '.png'
|
79 |
image.save(filename)
|
80 |
return filename
|
81 |
|
@@ -216,5 +216,5 @@ with gr.Blocks(css=css) as demo:
|
|
216 |
|
217 |
|
218 |
demo.queue(api_open=False, max_size=16)
|
219 |
-
demo.launch(debug=True, server_name="0.0.0.0")
|
220 |
# demo.launch(debug=True, server_name="127.0.0.1")
|
|
|
75 |
|
76 |
def save_image_to_local(image: Image.Image):
|
77 |
# TODO(jykoh): Update so the url path is used, to prevent repeat saving.
|
78 |
+
filename = '/tmp/' + next(tempfile._get_candidate_names()) + '.png'
|
79 |
image.save(filename)
|
80 |
return filename
|
81 |
|
|
|
216 |
|
217 |
|
218 |
demo.queue(api_open=False, max_size=16)
|
219 |
+
demo.launch(debug=True, server_name="0.0.0.0", allowed_paths='/tmp/')
|
220 |
# demo.launch(debug=True, server_name="127.0.0.1")
|