Spaces:
Sleeping
Sleeping
soojeongcrystal
commited on
Commit
β’
702c25c
1
Parent(s):
777fd1a
Update app.py
Browse files
app.py
CHANGED
@@ -73,15 +73,19 @@ def validate_and_get_columns(employee_df, program_df):
|
|
73 |
|
74 |
return None, employee_cols, program_cols
|
75 |
|
76 |
-
# μ νλΈ λ°μ΄ν° μ΄ μ ν ν¨μ
|
77 |
def select_youtube_columns(youtube_file):
|
78 |
global youtube_columns
|
79 |
youtube_df = pd.read_csv(youtube_file.name)
|
80 |
required_youtube_cols = ["title", "description", "url", "upload_date"]
|
81 |
youtube_columns = auto_match_columns(youtube_df, required_youtube_cols)
|
82 |
|
83 |
-
column_options =
|
84 |
-
return [
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
# μ νλΈ μ½ν
μΈ λ°μ΄ν° λ‘λ λ° μ²λ¦¬ ν¨μ
|
87 |
def load_youtube_content(file_path, title_col, description_col, url_col, upload_date_col):
|
|
|
73 |
|
74 |
return None, employee_cols, program_cols
|
75 |
|
|
|
76 |
def select_youtube_columns(youtube_file):
|
77 |
global youtube_columns
|
78 |
youtube_df = pd.read_csv(youtube_file.name)
|
79 |
required_youtube_cols = ["title", "description", "url", "upload_date"]
|
80 |
youtube_columns = auto_match_columns(youtube_df, required_youtube_cols)
|
81 |
|
82 |
+
column_options = youtube_df.columns.tolist()
|
83 |
+
return [
|
84 |
+
gr.Dropdown(choices=column_options, value=youtube_columns.get("title", "")),
|
85 |
+
gr.Dropdown(choices=column_options, value=youtube_columns.get("description", "")),
|
86 |
+
gr.Dropdown(choices=column_options, value=youtube_columns.get("url", "")),
|
87 |
+
gr.Dropdown(choices=column_options, value=youtube_columns.get("upload_date", ""))
|
88 |
+
]
|
89 |
|
90 |
# μ νλΈ μ½ν
μΈ λ°μ΄ν° λ‘λ λ° μ²λ¦¬ ν¨μ
|
91 |
def load_youtube_content(file_path, title_col, description_col, url_col, upload_date_col):
|