Upload app.py
Browse files
app.py
CHANGED
@@ -46,9 +46,10 @@ def handle_tsp_solve(
|
|
46 |
):
|
47 |
try:
|
48 |
message = _handle_tsp_solve(file_path, norm)
|
|
|
49 |
except Exception as e:
|
50 |
message = str(e)
|
51 |
-
|
52 |
|
53 |
|
54 |
def handle_tsp_clear():
|
@@ -75,7 +76,6 @@ with gr.Blocks() as tsp_page:
|
|
75 |
gr.Markdown(
|
76 |
'''
|
77 |
This space displays the solution to the TSP problem.
|
78 |
-
|
79 |
## How to use this Space?
|
80 |
- Upload a '.tsp' file from tsplib .
|
81 |
- The images of the TSP problem and solution will be shown after you click the solve button.
|
@@ -140,4 +140,4 @@ with gr.Blocks() as tsp_page:
|
|
140 |
|
141 |
|
142 |
if __name__ == "__main__":
|
143 |
-
tsp_page.launch(debug = True)
|
|
|
46 |
):
|
47 |
try:
|
48 |
message = _handle_tsp_solve(file_path, norm)
|
49 |
+
return message
|
50 |
except Exception as e:
|
51 |
message = str(e)
|
52 |
+
return message, TSP_PROBLEM_PATH, TSP_SOLUTION_PATH
|
53 |
|
54 |
|
55 |
def handle_tsp_clear():
|
|
|
76 |
gr.Markdown(
|
77 |
'''
|
78 |
This space displays the solution to the TSP problem.
|
|
|
79 |
## How to use this Space?
|
80 |
- Upload a '.tsp' file from tsplib .
|
81 |
- The images of the TSP problem and solution will be shown after you click the solve button.
|
|
|
140 |
|
141 |
|
142 |
if __name__ == "__main__":
|
143 |
+
tsp_page.launch(debug = True)
|