Spaces:
Paused
Paused
Tao Wu
commited on
Commit
·
366d3da
1
Parent(s):
e789d9b
add skills query
Browse files- app/app.py +7 -8
app/app.py
CHANGED
@@ -46,7 +46,7 @@ def retrieve_documents(occupation,skills):
|
|
46 |
candidate_doc_unique = []
|
47 |
|
48 |
for doc in candidate_doc:
|
49 |
-
course_id = doc
|
50 |
if course_id not in seen_course_ids:
|
51 |
candidate_doc_unique.append(doc)
|
52 |
seen_course_ids.add(course_id)
|
@@ -208,14 +208,13 @@ if __name__ == "__main__":
|
|
208 |
occupations = {**occupations_esco, **occupations_BA}
|
209 |
# Gradio interface
|
210 |
with gr.Blocks(title="MyEduLife Kursempfehlungssystem") as demo:
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
skillgap_dropdown = gr.Dropdown([],label="Fähigkeiten", multiselect=True,info='Bitte wählen Sie die Fähigkeiten aus, die Sie lernen möchten.')
|
216 |
# Use gr.HTML to display the HTML content
|
217 |
-
|
218 |
-
|
219 |
|
220 |
occupation_dropdown.change(update_skills, inputs=occupation_dropdown, outputs=currentskill_dropdown)
|
221 |
|
|
|
46 |
candidate_doc_unique = []
|
47 |
|
48 |
for doc in candidate_doc:
|
49 |
+
course_id = doc.metadata.get('course_id','')
|
50 |
if course_id not in seen_course_ids:
|
51 |
candidate_doc_unique.append(doc)
|
52 |
seen_course_ids.add(course_id)
|
|
|
208 |
occupations = {**occupations_esco, **occupations_BA}
|
209 |
# Gradio interface
|
210 |
with gr.Blocks(title="MyEduLife Kursempfehlungssystem") as demo:
|
211 |
+
occupation_dropdown = gr.Dropdown(list(occupations.keys()), label="Zielberuf",info='Bitte wählen Sie Ihren Zielberuf aus.')
|
212 |
+
currentskill_dropdown = gr.Dropdown([],label="aktuelle Fähigkeiten", multiselect=True,info='Bitte wählen Sie die Fähigkeiten aus, die Sie derzeit besitzen')
|
213 |
+
sb_btn = gr.Button("Absenden")
|
214 |
+
skillgap_dropdown = gr.Dropdown([],label="Fähigkeiten", multiselect=True,info='Bitte wählen Sie die Fähigkeiten aus, die Sie lernen möchten.')
|
|
|
215 |
# Use gr.HTML to display the HTML content
|
216 |
+
button = gr.Button("Kursempfehlungen")
|
217 |
+
documents_output = gr.HTML()
|
218 |
|
219 |
occupation_dropdown.change(update_skills, inputs=occupation_dropdown, outputs=currentskill_dropdown)
|
220 |
|