Ari commited on
Commit
e253735
·
1 Parent(s): 6633803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,11 +24,13 @@ def query_gpt(prompt):
24
  message = response.choices[0].text.strip()
25
  return message
26
 
 
27
  def get_insights(question):
28
- prompt = f"Given the following dataset:\n\n{data.to_string(index=False)}\n\n{question}"
29
  answer = query_gpt(prompt)
30
  return answer
31
 
 
32
  markdown_data = f"Mock Dataset For GDS Social MBR :\n```\n{data.head(10).to_string(index=False)}\n```\n"
33
 
34
  iface = gr.Interface(
 
24
  message = response.choices[0].text.strip()
25
  return message
26
 
27
+
28
  def get_insights(question):
29
+ prompt = f"Using ONLY the information in the following dataset:\n\n{data.to_string(index=False)}\n\nPlease answer the question: {question}\n\nRemember, base your answer solely on the data provided in the dataset."
30
  answer = query_gpt(prompt)
31
  return answer
32
 
33
+
34
  markdown_data = f"Mock Dataset For GDS Social MBR :\n```\n{data.head(10).to_string(index=False)}\n```\n"
35
 
36
  iface = gr.Interface(