Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,8 @@ def generate_cheatsheet_func(training_data_text, model_name_input, progress=gr.P
|
|
57 |
if not training_data_text.strip():
|
58 |
current_cheatsheet_cache = "(empty)"
|
59 |
return "Training data is empty. Cheatsheet reset to (empty)."
|
60 |
-
|
|
|
61 |
model = initialize_model(model_name_input)
|
62 |
|
63 |
training_examples = [ex.strip() for ex in training_data_text.split("\n") if ex.strip()]
|
@@ -91,6 +92,7 @@ def get_answers_func(user_query, model_name_input):
|
|
91 |
if not user_query.strip():
|
92 |
return "Query is empty.", "Query is empty."
|
93 |
|
|
|
94 |
model = initialize_model(model_name_input)
|
95 |
answer_with_cheatsheet = "Error retrieving answer."
|
96 |
answer_without_cheatsheet = "Error retrieving answer."
|
@@ -118,7 +120,7 @@ def get_answers_func(user_query, model_name_input):
|
|
118 |
results_without_cheatsheet = model.advanced_generate(
|
119 |
approach_name="DynamicCheatsheet_Cumulative",
|
120 |
input_txt=user_query,
|
121 |
-
cheatsheet="",
|
122 |
generator_template=GENERATOR_PROMPT,
|
123 |
cheatsheet_template=CURATOR_PROMPT,
|
124 |
temperature=0.1,
|
|
|
57 |
if not training_data_text.strip():
|
58 |
current_cheatsheet_cache = "(empty)"
|
59 |
return "Training data is empty. Cheatsheet reset to (empty)."
|
60 |
+
|
61 |
+
print('generate_cheatsheet_func model_name_input', model_name_input)
|
62 |
model = initialize_model(model_name_input)
|
63 |
|
64 |
training_examples = [ex.strip() for ex in training_data_text.split("\n") if ex.strip()]
|
|
|
92 |
if not user_query.strip():
|
93 |
return "Query is empty.", "Query is empty."
|
94 |
|
95 |
+
print('get_answers_func model_name_input', model_name_input)
|
96 |
model = initialize_model(model_name_input)
|
97 |
answer_with_cheatsheet = "Error retrieving answer."
|
98 |
answer_without_cheatsheet = "Error retrieving answer."
|
|
|
120 |
results_without_cheatsheet = model.advanced_generate(
|
121 |
approach_name="DynamicCheatsheet_Cumulative",
|
122 |
input_txt=user_query,
|
123 |
+
cheatsheet="(empty)",
|
124 |
generator_template=GENERATOR_PROMPT,
|
125 |
cheatsheet_template=CURATOR_PROMPT,
|
126 |
temperature=0.1,
|