Neurolingua
commited on
Commit
•
e415d99
1
Parent(s):
815fe05
Update student_functions.py
Browse files- student_functions.py +4 -4
student_functions.py
CHANGED
@@ -40,7 +40,7 @@ def generate_response_from_pdf(query, pdf_text):
|
|
40 |
):
|
41 |
if chunk.choices[0].delta.content:
|
42 |
response += chunk.choices[0].delta.content
|
43 |
-
return response
|
44 |
|
45 |
|
46 |
def generate_quiz(subject, topic, count, difficult):
|
@@ -92,7 +92,7 @@ def generate_ai_response(query):
|
|
92 |
):
|
93 |
if chunk.choices[0].delta.content:
|
94 |
ai_response += chunk.choices[0].delta.content
|
95 |
-
return ai_response.replace('###', '')
|
96 |
|
97 |
|
98 |
def generate_project_idea(subject, topic, overview):
|
@@ -304,8 +304,8 @@ def summarise_text(url):
|
|
304 |
texts = extract_text_from_json(r'youtube_captions.json')
|
305 |
os.remove('youtube_captions.json')
|
306 |
|
307 |
-
first_half = (get_simplified_explanation(texts[:len(texts) // 2]))
|
308 |
-
second_half = (get_simplified_explanation(texts[len(texts) // 2:]))
|
309 |
return (first_half + second_half)
|
310 |
|
311 |
|
|
|
40 |
):
|
41 |
if chunk.choices[0].delta.content:
|
42 |
response += chunk.choices[0].delta.content
|
43 |
+
return response.replace("###", '')
|
44 |
|
45 |
|
46 |
def generate_quiz(subject, topic, count, difficult):
|
|
|
92 |
):
|
93 |
if chunk.choices[0].delta.content:
|
94 |
ai_response += chunk.choices[0].delta.content
|
95 |
+
return ai_response.replace('###', '')
|
96 |
|
97 |
|
98 |
def generate_project_idea(subject, topic, overview):
|
|
|
304 |
texts = extract_text_from_json(r'youtube_captions.json')
|
305 |
os.remove('youtube_captions.json')
|
306 |
|
307 |
+
first_half = (get_simplified_explanation(texts[:len(texts) // 2]))
|
308 |
+
second_half = (get_simplified_explanation(texts[len(texts) // 2:]))
|
309 |
return (first_half + second_half)
|
310 |
|
311 |
|