Spaces:
Running
Running
jeffrey
commited on
Commit
•
77c3530
1
Parent(s):
5923c02
Fix data creation error
Browse files- app.py +1 -1
- src/create.py +2 -2
app.py
CHANGED
@@ -236,4 +236,4 @@ with gr.Blocks(theme="earneleh/paris") as demo:
|
|
236 |
upstage_key_textbox.submit(on_submit_upstage_key, inputs=[upstage_key_textbox], outputs=upstage_key_status_box)
|
237 |
|
238 |
|
239 |
-
demo.launch(share=False, debug=
|
|
|
236 |
upstage_key_textbox.submit(on_submit_upstage_key, inputs=[upstage_key_textbox], outputs=upstage_key_status_box)
|
237 |
|
238 |
|
239 |
+
demo.launch(share=False, debug=False, allowed_paths=[FILE_DIR, DATA_DIR])
|
src/create.py
CHANGED
@@ -32,7 +32,7 @@ def default_create(corpus_df, llm: BaseLLM, n: int = 100, lang: str = "en",
|
|
32 |
progress(0.6)
|
33 |
filtered_answers = concise_answers.filter(dontknow_filter_rule_based, lang=lang)
|
34 |
progress(0.8)
|
35 |
-
initial_qa = filtered_answers.batch_filter(passage_dependency_filter_llama_index, lang=lang, batch_size=batch_size)
|
36 |
progress(0.96)
|
37 |
return initial_qa
|
38 |
|
@@ -88,7 +88,7 @@ def advanced_create(corpus_df, llm: BaseLLM, n: int = 100, lang: str = "en",
|
|
88 |
progress(0.35)
|
89 |
filtered_answers = concise_answers.filter(dontknow_filter_rule_based, lang=lang)
|
90 |
progress(0.45)
|
91 |
-
initial_qa = filtered_answers.batch_filter(passage_dependency_filter_llama_index, lang=lang, batch_size=batch_size)
|
92 |
progress(0.55)
|
93 |
cut_idx = n // 2
|
94 |
reasoning_qa = initial_qa.map(lambda df: df.iloc[:cut_idx]).batch_apply(
|
|
|
32 |
progress(0.6)
|
33 |
filtered_answers = concise_answers.filter(dontknow_filter_rule_based, lang=lang)
|
34 |
progress(0.8)
|
35 |
+
initial_qa = filtered_answers.batch_filter(passage_dependency_filter_llama_index, llm=llm, lang=lang, batch_size=batch_size)
|
36 |
progress(0.96)
|
37 |
return initial_qa
|
38 |
|
|
|
88 |
progress(0.35)
|
89 |
filtered_answers = concise_answers.filter(dontknow_filter_rule_based, lang=lang)
|
90 |
progress(0.45)
|
91 |
+
initial_qa = filtered_answers.batch_filter(passage_dependency_filter_llama_index, llm=llm, lang=lang, batch_size=batch_size)
|
92 |
progress(0.55)
|
93 |
cut_idx = n // 2
|
94 |
reasoning_qa = initial_qa.map(lambda df: df.iloc[:cut_idx]).batch_apply(
|