Spaces:
Paused
Paused
Tao Wu
commited on
Commit
·
d0487d6
1
Parent(s):
59d8c8c
update
Browse files- app/app.py +2 -1
- app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/data_level0.bin +1 -1
- app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/index_metadata.pickle +1 -1
- app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/length.bin +1 -1
- app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/link_lists.bin +1 -1
- app/data/EduGBERT_cos_escoai/chroma.sqlite3 +2 -2
- app/embedding_setup.py +2 -2
app/app.py
CHANGED
@@ -33,6 +33,7 @@ def retrieve_documents(occupation,skills):
|
|
33 |
for german_label in skills:
|
34 |
skill_query += german_label + ' '
|
35 |
query = target_occupation_query + ' ' + skill_query
|
|
|
36 |
print(query)
|
37 |
docs = retriever.get_relevant_documents(query)
|
38 |
|
@@ -44,7 +45,7 @@ def retrieve_documents(occupation,skills):
|
|
44 |
for doc in sorted_docs[:5]:
|
45 |
doc_name = doc.metadata.get('name', 'Unnamed Document')
|
46 |
doc_skill = doc.metadata.get('skills', '')
|
47 |
-
input_text = f"target occupation: {
|
48 |
prompt = generate_prompt_exp(input_text)
|
49 |
batch_prompts.append(prompt)
|
50 |
|
|
|
33 |
for german_label in skills:
|
34 |
skill_query += german_label + ' '
|
35 |
query = target_occupation_query + ' ' + skill_query
|
36 |
+
llama_query = 'info:' + target_occupation_name + ' ' + 'skills gap:' + skill_query
|
37 |
print(query)
|
38 |
docs = retriever.get_relevant_documents(query)
|
39 |
|
|
|
45 |
for doc in sorted_docs[:5]:
|
46 |
doc_name = doc.metadata.get('name', 'Unnamed Document')
|
47 |
doc_skill = doc.metadata.get('skills', '')
|
48 |
+
input_text = f"target occupation: {llama_query}\n courses: name: {doc_name}, learning objectives: {doc_skill}"
|
49 |
prompt = generate_prompt_exp(input_text)
|
50 |
batch_prompts.append(prompt)
|
51 |
|
app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/data_level0.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 29652000
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:932d15f4490ff30ab1d591f138d66086a4f10ef53e0d32fa6ed0bbae26081ea8
|
3 |
size 29652000
|
app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/index_metadata.pickle
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 404064
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d050b5aede2ec58e0e741f33d0c4499c4b98dd200b5166b557d1a5ee49e2db23
|
3 |
size 404064
|
app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/length.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 28000
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:faebe1fab42b5b6f39d3193b6a1396941178c28de5c11d0a3b2780232793cd8b
|
3 |
size 28000
|
app/data/EduGBERT_cos_escoai/3b822eb4-09a8-4577-a432-58654a23254b/link_lists.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 59416
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:012030771b78fb3011beddf18b990501672f8c5fb473ffb113f0e79ddd70d390
|
3 |
size 59416
|
app/data/EduGBERT_cos_escoai/chroma.sqlite3
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:151c1ef6c86444719fcd68cef527bab9e48ba631990b9296cd17c822c0011ca0
|
3 |
+
size 113479680
|
app/embedding_setup.py
CHANGED
@@ -128,8 +128,8 @@ def evaluate(
|
|
128 |
|
129 |
def compare_docs_with_context(doc_a, doc_b, target_occupation_name, target_occupation_dsp,skill_gap):
|
130 |
|
131 |
-
courses = f"First: name: {doc_a.metadata['name']} description:{doc_a.metadata['description']} Second: name: {doc_b.metadata['name']} description:{
|
132 |
-
|
133 |
target_occupation = f"name: {target_occupation_name} description: {target_occupation_dsp}"
|
134 |
skill_gap = skill_gap
|
135 |
prompt = generate_prompt(target_occupation, skill_gap, courses)
|
|
|
128 |
|
129 |
def compare_docs_with_context(doc_a, doc_b, target_occupation_name, target_occupation_dsp,skill_gap):
|
130 |
|
131 |
+
#courses = f"First: name: {doc_a.metadata['name']} description:{doc_a.metadata['description']} Second: name: {doc_b.metadata['name']} description:{Sdoc_b.metadata['description']}"
|
132 |
+
courses = f"First: name: {doc_a.metadata['name']} learning outcomes:{doc_a.metadata['skills']} Second: name: {doc_b.metadata['name']} learning outcomes:{doc_b.metadata['skills']}"
|
133 |
target_occupation = f"name: {target_occupation_name} description: {target_occupation_dsp}"
|
134 |
skill_gap = skill_gap
|
135 |
prompt = generate_prompt(target_occupation, skill_gap, courses)
|