Nucha commited on
Commit
f8c1ed5
·
verified ·
1 Parent(s): be8ff6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py CHANGED
@@ -1,4 +1,31 @@
1
  import os
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  height = gr.Slider(300, 2000, value=800, step=50, label="Height")
3
  with gr.Row():
4
  bg = gr.Textbox(value=DEFAULT_BG, label="Background color (e.g., white or #111827)")
 
1
  import os
2
+ # --- Gradio UI ---
3
+ with gr.Blocks(title="Soft Skills Word Cloud") as demo:
4
+ gr.Markdown("""
5
+ # 🧩 Soft Skills Word Cloud
6
+ Upload your CSV (or place `Soft_Skills__Top_5000_.csv` in the repo) to generate a word cloud.
7
+ - **Skill column**: text names of skills (e.g., `communication`, `teamwork`).
8
+ - **Count column** (optional): frequency/weight of each skill.
9
+ """)
10
+
11
+
12
+ df_state = gr.State()
13
+
14
+
15
+ with gr.Row():
16
+ csv_file = gr.File(label="CSV file", file_types=[".csv"], interactive=True)
17
+ font_file = gr.File(label="Font (optional .ttf)")
18
+
19
+
20
+ with gr.Row():
21
+ skill_col = gr.Dropdown(choices=[], label="Skill column", interactive=True)
22
+ count_col = gr.Dropdown(choices=["(none)"], value="(none)", label="Count column (optional)", interactive=True)
23
+
24
+
25
+ with gr.Accordion("Advanced options", open=False):
26
+ with gr.Row():
27
+ max_words = gr.Slider(50, 1000, value=DEFAULT_MAX_WORDS, step=10, label="Max words")
28
+ width = gr.Slider(400, 3000, value=1400, step=50, label="Width")
29
  height = gr.Slider(300, 2000, value=800, step=50, label="Height")
30
  with gr.Row():
31
  bg = gr.Textbox(value=DEFAULT_BG, label="Background color (e.g., white or #111827)")