Omnibus commited on
Commit
1b2ab6f
·
verified ·
1 Parent(s): dc5f068

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -89,7 +89,7 @@ def run_gpt(
89
  return resp
90
 
91
 
92
- def compress_data(c,purpose, task, history, result):
93
  seed=random.randint(1,1000000000)
94
  print (c)
95
  divr=int(c)/MAX_DATA
@@ -144,9 +144,13 @@ def compress_data(c,purpose, task, history, result):
144
 
145
 
146
  def summarize(inp,history,data=None):
 
147
  json_box=[]
148
  if inp == "":
149
  inp = "Process this data"
 
 
 
150
  history.clear()
151
  history = [(inp,"Working on it...")]
152
  yield "",history
@@ -162,19 +166,9 @@ def summarize(inp,history,data=None):
162
  c +=1
163
  print (f'c:: {c}')
164
 
165
- json_out = compress_data(c,inp,out)
166
  out = str(json_out)
167
- if report_check:
168
- rl = len(out)
169
- print(f'rl:: {rl}')
170
- c=1
171
- for i in str(out):
172
- if i == " " or i=="," or i=="\n":
173
- c +=1
174
- print (f'c2:: {c}')
175
- rawp = compress_data_og(c,inp,out)
176
- else:
177
- rawp = out
178
  else:
179
  rawp = "Provide a valid data source"
180
  history.append((inp,rawp))
 
89
  return resp
90
 
91
 
92
+ def compress_data(c,purpose, task, history):
93
  seed=random.randint(1,1000000000)
94
  print (c)
95
  divr=int(c)/MAX_DATA
 
144
 
145
 
146
  def summarize(inp,history,data=None):
147
+
148
  json_box=[]
149
  if inp == "":
150
  inp = "Process this data"
151
+ #inp = format_prompt(inp,history)
152
+ task = "Compile a detailed report"
153
+
154
  history.clear()
155
  history = [(inp,"Working on it...")]
156
  yield "",history
 
166
  c +=1
167
  print (f'c:: {c}')
168
 
169
+ json_out = compress_data(c,inp,task,out)
170
  out = str(json_out)
171
+ rawp = out
 
 
 
 
 
 
 
 
 
 
172
  else:
173
  rawp = "Provide a valid data source"
174
  history.append((inp,rawp))