Spaces:
Runtime error
Runtime error
ubuntu
commited on
Commit
β’
51ba6a4
1
Parent(s):
2ecc324
update
Browse files- app.py +9 -5
- {src β media}/pygm_default.png +0 -0
- {src β media}/pygm_image_1.png +0 -0
- {src β media}/pygm_image_2.png +0 -0
app.py
CHANGED
@@ -4,9 +4,9 @@ import gradio as gr
|
|
4 |
from pygm_rrwm import pygm_rrwm
|
5 |
|
6 |
|
7 |
-
PYGM_IMG_DEFAULT_PATH = "
|
8 |
-
PYGM_SOLUTION_1_PATH = "
|
9 |
-
PYGM_SOLUTION_2_PATH = "
|
10 |
|
11 |
|
12 |
def _handle_pygm_solve(
|
@@ -80,15 +80,19 @@ def convert_image_path_to_bytes(image_path):
|
|
80 |
|
81 |
|
82 |
with gr.Blocks() as pygm_page:
|
|
|
83 |
gr.Markdown(
|
84 |
'''
|
85 |
This space displays the solution to the Graph Matching problem.
|
86 |
## How to use this Space?
|
87 |
-
- Upload
|
88 |
-
- The
|
89 |
- Click the 'clear' button to clear all the files.
|
|
|
|
|
90 |
'''
|
91 |
)
|
|
|
92 |
with gr.Row(variant="panel"):
|
93 |
with gr.Column(scale=2):
|
94 |
with gr.Row():
|
|
|
4 |
from pygm_rrwm import pygm_rrwm
|
5 |
|
6 |
|
7 |
+
PYGM_IMG_DEFAULT_PATH = "media/pygm_default.png"
|
8 |
+
PYGM_SOLUTION_1_PATH = "media/pygm_image_1.png"
|
9 |
+
PYGM_SOLUTION_2_PATH = "media/pygm_image_2.png"
|
10 |
|
11 |
|
12 |
def _handle_pygm_solve(
|
|
|
80 |
|
81 |
|
82 |
with gr.Blocks() as pygm_page:
|
83 |
+
|
84 |
gr.Markdown(
|
85 |
'''
|
86 |
This space displays the solution to the Graph Matching problem.
|
87 |
## How to use this Space?
|
88 |
+
- Upload two pairs of '.png' and '.mat' files.
|
89 |
+
- The results of the Graph Matching problem will be shown after you click the solve button.
|
90 |
- Click the 'clear' button to clear all the files.
|
91 |
+
## Examples
|
92 |
+
- You can get the test examples from our [Graph Match Dataset Repo.](https://huggingface.co/datasets/SJTU-TES/Graph-Match)
|
93 |
'''
|
94 |
)
|
95 |
+
|
96 |
with gr.Row(variant="panel"):
|
97 |
with gr.Column(scale=2):
|
98 |
with gr.Row():
|
{src β media}/pygm_default.png
RENAMED
File without changes
|
{src β media}/pygm_image_1.png
RENAMED
File without changes
|
{src β media}/pygm_image_2.png
RENAMED
File without changes
|