Spaces:
Runtime error
Runtime error
debugging gradio not receiving any images
Browse files- app.py +2 -1
- bayes/data_routines.py +1 -1
app.py
CHANGED
@@ -83,7 +83,8 @@ def image_mod(image):
|
|
83 |
return image.rotate(45)
|
84 |
|
85 |
if __name__ == "__main__":
|
86 |
-
|
|
|
87 |
inp = gr.inputs.Textbox(lines=1, placeholder="Insert file path here", default="", label="Input Image Path", optional=False)
|
88 |
out = gr.outputs.HTML(label="Output Video")
|
89 |
|
|
|
83 |
return image.rotate(45)
|
84 |
|
85 |
if __name__ == "__main__":
|
86 |
+
# gradio's image inputs look like this: <PIL.Image.Image image mode=RGB size=305x266 at 0x7F3D01C91FA0>
|
87 |
+
# need to learn how to handle image inputs, or deal with file inputs or just file path strings
|
88 |
inp = gr.inputs.Textbox(lines=1, placeholder="Insert file path here", default="", label="Input Image Path", optional=False)
|
89 |
out = gr.outputs.HTML(label="Output Video")
|
90 |
|
bayes/data_routines.py
CHANGED
@@ -128,7 +128,7 @@ def get_imagenet(name, get_label=True):
|
|
128 |
images_paths = []
|
129 |
|
130 |
# Store all the paths of the images
|
131 |
-
data_dir = os.path.join("
|
132 |
for (dirpath, dirnames, filenames) in os.walk(data_dir):
|
133 |
for fn in filenames:
|
134 |
if fn != ".DS_Store":
|
|
|
128 |
images_paths = []
|
129 |
|
130 |
# Store all the paths of the images
|
131 |
+
data_dir = os.path.join("./data", name)
|
132 |
for (dirpath, dirnames, filenames) in os.walk(data_dir):
|
133 |
for fn in filenames:
|
134 |
if fn != ".DS_Store":
|