Spaces:
Sleeping
Sleeping
Update llm.py
Browse files
llm.py
CHANGED
@@ -215,7 +215,7 @@ def responce_formator(res):
|
|
215 |
|
216 |
def get_prompt(question_type):
|
217 |
seed = random.randint(10000, 99999)
|
218 |
-
context = f"""
|
219 |
prompt = prompts[question_type]
|
220 |
prompt = context + prompt + str(seed)
|
221 |
return prompt, seed
|
@@ -226,5 +226,7 @@ def get_responce(prompt):
|
|
226 |
start = res.find("[")
|
227 |
end = res.find("]")
|
228 |
res = res[start: end+1]
|
|
|
|
|
229 |
res = eval(res)
|
230 |
return responce_formator(res)
|
|
|
215 |
|
216 |
def get_prompt(question_type):
|
217 |
seed = random.randint(10000, 99999)
|
218 |
+
context = f"""Context= [ {text} ]\n"""
|
219 |
prompt = prompts[question_type]
|
220 |
prompt = context + prompt + str(seed)
|
221 |
return prompt, seed
|
|
|
226 |
start = res.find("[")
|
227 |
end = res.find("]")
|
228 |
res = res[start: end+1]
|
229 |
+
print("*"*20)
|
230 |
+
print(res)
|
231 |
res = eval(res)
|
232 |
return responce_formator(res)
|