Spaces:
Runtime error
Runtime error
Fix paths of demo images
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
# See the License for the specific language governing permissions and
|
| 14 |
# limitations under the License.
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
import torch
|
| 19 |
from torchvision import transforms as T
|
|
@@ -79,8 +79,7 @@ def main():
|
|
| 79 |
|
| 80 |
output = gr.Textbox(max_lines=1, label='Model output')
|
| 81 |
|
| 82 |
-
|
| 83 |
-
gr.Examples([str(p) for p in demo_images], inputs=image_upload)
|
| 84 |
|
| 85 |
read_upload.click(app, inputs=[model_name, image_upload], outputs=output)
|
| 86 |
read_canvas.click(app, inputs=[model_name, image_canvas], outputs=output)
|
|
|
|
| 13 |
# See the License for the specific language governing permissions and
|
| 14 |
# limitations under the License.
|
| 15 |
|
| 16 |
+
import glob
|
| 17 |
|
| 18 |
import torch
|
| 19 |
from torchvision import transforms as T
|
|
|
|
| 79 |
|
| 80 |
output = gr.Textbox(max_lines=1, label='Model output')
|
| 81 |
|
| 82 |
+
gr.Examples(glob.glob('demo_images/*.*'), inputs=image_upload)
|
|
|
|
| 83 |
|
| 84 |
read_upload.click(app, inputs=[model_name, image_upload], outputs=output)
|
| 85 |
read_canvas.click(app, inputs=[model_name, image_canvas], outputs=output)
|