Spaces:
Running
Running
Commit
·
147a16a
1
Parent(s):
d0808a2
Fix indentation and error handling in NLP mindmap generation
Browse files- nlp_summarizer.py +4 -4
nlp_summarizer.py
CHANGED
@@ -16,8 +16,8 @@ def generate_nlp_summary(client, temp_summary):
|
|
16 |
return False
|
17 |
|
18 |
def generate_nlp_mindmap(client, temp_summary):
|
19 |
-
|
20 |
-
|
21 |
completion = client.chat.completions.create(
|
22 |
model="llama-3.2-90b-vision-preview",
|
23 |
messages=[
|
@@ -27,8 +27,8 @@ def generate_nlp_mindmap(client, temp_summary):
|
|
27 |
)
|
28 |
print(completion.choices[0].message.content)
|
29 |
return completion.choices[0].message.content
|
30 |
-
|
31 |
-
|
32 |
|
33 |
def generate_nlp_summary_and_mindmap(client, temp_summary):
|
34 |
response = {}
|
|
|
16 |
return False
|
17 |
|
18 |
def generate_nlp_mindmap(client, temp_summary):
|
19 |
+
print("Generating Mindmap")
|
20 |
+
try:
|
21 |
completion = client.chat.completions.create(
|
22 |
model="llama-3.2-90b-vision-preview",
|
23 |
messages=[
|
|
|
27 |
)
|
28 |
print(completion.choices[0].message.content)
|
29 |
return completion.choices[0].message.content
|
30 |
+
except Exception as e:
|
31 |
+
return False
|
32 |
|
33 |
def generate_nlp_summary_and_mindmap(client, temp_summary):
|
34 |
response = {}
|