ZahirJS commited on
Commit
4517972
·
verified ·
1 Parent(s): c9576b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -6,7 +6,7 @@ from synoptic_chart_generator import generate_synoptic_chart
6
  from radial_diagram_generator import generate_radial_diagram
7
  from sample_data import CONCEPT_MAP_JSON, SYNOPTIC_CHART_JSON, RADIAL_DIAGRAM_JSON
8
 
9
- def create_interface(generator_fn, sample_json, title, description):
10
  """
11
  Helper function to create a Gradio Interface for a specific generator.
12
  """
@@ -24,6 +24,7 @@ def create_interface(generator_fn, sample_json, title, description):
24
  show_download_button=True
25
  ),
26
  title=title,
 
27
  )
28
 
29
  if __name__ == "__main__":
@@ -74,7 +75,7 @@ if __name__ == "__main__":
74
  ) as demo:
75
  gr.Markdown(
76
  """
77
- # Graphify: Generate concepts maps, synoptic charts and radial diagrams for JSON!
78
  Choose a graph type and provide your JSON data to generate a visual representation.
79
  All graphs maintain a consistent, elegant style with rounded boxes,
80
  a dark-to-light color gradient, and a clean white background.
@@ -86,23 +87,19 @@ if __name__ == "__main__":
86
  concept_map_interface = create_interface(
87
  generate_concept_map,
88
  CONCEPT_MAP_JSON,
89
- "Concept Map Generator",
90
-
91
  )
92
- # Removed .render() here
93
  with gr.TabItem("Synoptic Chart"):
94
  synoptic_chart_interface = create_interface(
95
  generate_synoptic_chart,
96
  SYNOPTIC_CHART_JSON,
97
- "Synoptic Chart Generator",
98
-
99
  )
100
- # Removed .render() here
101
  with gr.TabItem("Radial Diagram"):
102
  radial_diagram_interface = create_interface(
103
  generate_radial_diagram,
104
  RADIAL_DIAGRAM_JSON,
105
- "Radial Diagram Generator",
106
  )
107
 
108
  demo.launch(
 
6
  from radial_diagram_generator import generate_radial_diagram
7
  from sample_data import CONCEPT_MAP_JSON, SYNOPTIC_CHART_JSON, RADIAL_DIAGRAM_JSON
8
 
9
+ def create_interface(generator_fn, sample_json, title): # Removed 'description' parameter
10
  """
11
  Helper function to create a Gradio Interface for a specific generator.
12
  """
 
24
  show_download_button=True
25
  ),
26
  title=title,
27
+ # Removed description here
28
  )
29
 
30
  if __name__ == "__main__":
 
75
  ) as demo:
76
  gr.Markdown(
77
  """
78
+ # Graphify: Generate concept maps, synoptic charts and radial diagrams from JSON!
79
  Choose a graph type and provide your JSON data to generate a visual representation.
80
  All graphs maintain a consistent, elegant style with rounded boxes,
81
  a dark-to-light color gradient, and a clean white background.
 
87
  concept_map_interface = create_interface(
88
  generate_concept_map,
89
  CONCEPT_MAP_JSON,
90
+ "Concept Map Generator"
 
91
  )
 
92
  with gr.TabItem("Synoptic Chart"):
93
  synoptic_chart_interface = create_interface(
94
  generate_synoptic_chart,
95
  SYNOPTIC_CHART_JSON,
96
+ "Synoptic Chart Generator"
 
97
  )
 
98
  with gr.TabItem("Radial Diagram"):
99
  radial_diagram_interface = create_interface(
100
  generate_radial_diagram,
101
  RADIAL_DIAGRAM_JSON,
102
+ "Radial Diagram Generator"
103
  )
104
 
105
  demo.launch(