Danial7 commited on
Commit
a9c0dad
·
verified ·
1 Parent(s): 88a0d52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,12 +15,12 @@ topic = st.text_input("Enter a topic to generate mind map:", "")
15
 
16
  def generate_mindmap(topic):
17
  prompt = f"Create a simple, structured mind map for the topic '{topic}'. Use bullet points to show sub-topics and indentation for hierarchy."
18
- response = openai.ChatCompletion.create(
19
  model="gpt-3.5-turbo",
20
  messages=[{"role": "user", "content": prompt}],
21
  temperature=0.7
22
  )
23
- return response["choices"][0]["message"]["content"]
24
 
25
  def build_graph_from_text(text):
26
  G = nx.Graph()
 
15
 
16
  def generate_mindmap(topic):
17
  prompt = f"Create a simple, structured mind map for the topic '{topic}'. Use bullet points to show sub-topics and indentation for hierarchy."
18
+ response = openai.chat.completions.create(
19
  model="gpt-3.5-turbo",
20
  messages=[{"role": "user", "content": prompt}],
21
  temperature=0.7
22
  )
23
+ return response.choices[0].message.content
24
 
25
  def build_graph_from_text(text):
26
  G = nx.Graph()