Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,7 @@ from styles import get_css_styles
|
|
22 |
from breed_detection import create_detection_tab
|
23 |
from breed_comparison import create_comparison_tab
|
24 |
from breed_recommendation import create_recommendation_tab
|
|
|
25 |
from html_templates import (
|
26 |
format_description_html,
|
27 |
format_single_dog_result,
|
@@ -460,7 +461,7 @@ def main():
|
|
460 |
history_component = create_history_component()
|
461 |
|
462 |
with gr.Tabs():
|
463 |
-
# 1.
|
464 |
example_images = [
|
465 |
'Border_Collie.jpg',
|
466 |
'Golden_Retriever.jpeg',
|
@@ -470,7 +471,7 @@ def main():
|
|
470 |
]
|
471 |
detection_components = create_detection_tab(predict, example_images)
|
472 |
|
473 |
-
# 2.
|
474 |
comparison_components = create_comparison_tab(
|
475 |
dog_breeds=dog_breeds,
|
476 |
get_dog_description=get_dog_description,
|
@@ -478,7 +479,7 @@ def main():
|
|
478 |
breed_noise_info=breed_noise_info
|
479 |
)
|
480 |
|
481 |
-
# 3.
|
482 |
recommendation_components = create_recommendation_tab(
|
483 |
UserPreferences=UserPreferences,
|
484 |
get_breed_recommendations=get_breed_recommendations,
|
@@ -486,7 +487,16 @@ def main():
|
|
486 |
history_component=history_component
|
487 |
)
|
488 |
|
489 |
-
# 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
create_history_tab(history_component)
|
491 |
|
492 |
# Footer
|
|
|
22 |
from breed_detection import create_detection_tab
|
23 |
from breed_comparison import create_comparison_tab
|
24 |
from breed_recommendation import create_recommendation_tab
|
25 |
+
from breed_visualization import create_visualization_tab
|
26 |
from html_templates import (
|
27 |
format_description_html,
|
28 |
format_single_dog_result,
|
|
|
461 |
history_component = create_history_component()
|
462 |
|
463 |
with gr.Tabs():
|
464 |
+
# 1. breed detection
|
465 |
example_images = [
|
466 |
'Border_Collie.jpg',
|
467 |
'Golden_Retriever.jpeg',
|
|
|
471 |
]
|
472 |
detection_components = create_detection_tab(predict, example_images)
|
473 |
|
474 |
+
# 2. breed comparison
|
475 |
comparison_components = create_comparison_tab(
|
476 |
dog_breeds=dog_breeds,
|
477 |
get_dog_description=get_dog_description,
|
|
|
479 |
breed_noise_info=breed_noise_info
|
480 |
)
|
481 |
|
482 |
+
# 3. breed recommendation
|
483 |
recommendation_components = create_recommendation_tab(
|
484 |
UserPreferences=UserPreferences,
|
485 |
get_breed_recommendations=get_breed_recommendations,
|
|
|
487 |
history_component=history_component
|
488 |
)
|
489 |
|
490 |
+
# 4. visualization analysis
|
491 |
+
with gr.Tab("Visualization Analysis"):
|
492 |
+
create_visualization_tab(
|
493 |
+
dog_breeds=dog_breeds,
|
494 |
+
get_dog_description=get_dog_description,
|
495 |
+
calculate_compatibility_score=calculate_compatibility_score,
|
496 |
+
UserPreferences=UserPreferences
|
497 |
+
)
|
498 |
+
|
499 |
+
# 5. history pages
|
500 |
create_history_tab(history_component)
|
501 |
|
502 |
# Footer
|