Spaces:
Runtime error
Runtime error
Kajise Org
commited on
Commit
•
a5e1d16
1
Parent(s):
df95c95
Fix that instruction part in generate function, provide 1 data for now
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def search_ddg(question: str):
|
|
41 |
output_string: str = ""
|
42 |
|
43 |
for element in result_texts:
|
44 |
-
if len(results) <
|
45 |
text_content = element.get_text()
|
46 |
results.append(text_content)
|
47 |
else:
|
@@ -53,7 +53,7 @@ def search_ddg(question: str):
|
|
53 |
return output_string
|
54 |
|
55 |
def generate(instruction):
|
56 |
-
feeding_data = search_ddg(
|
57 |
|
58 |
response = llm(ins.format(question=instruction, data=feeding_data), stop=['### Instruction:', '### End'])
|
59 |
result = response['choices'][0]['text']
|
|
|
41 |
output_string: str = ""
|
42 |
|
43 |
for element in result_texts:
|
44 |
+
if len(results) < 1:
|
45 |
text_content = element.get_text()
|
46 |
results.append(text_content)
|
47 |
else:
|
|
|
53 |
return output_string
|
54 |
|
55 |
def generate(instruction):
|
56 |
+
feeding_data = search_ddg(instruction)
|
57 |
|
58 |
response = llm(ins.format(question=instruction, data=feeding_data), stop=['### Instruction:', '### End'])
|
59 |
result = response['choices'][0]['text']
|