Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -142,8 +142,8 @@ def run_gpt(
|
|
| 142 |
return resp
|
| 143 |
|
| 144 |
|
| 145 |
-
def compress_data(c, instruct, history):
|
| 146 |
-
seed=random.randint(1,1000000000)
|
| 147 |
|
| 148 |
print (f'c:: {c}')
|
| 149 |
#tot=len(purpose)
|
|
@@ -183,9 +183,10 @@ def compress_data(c, instruct, history):
|
|
| 183 |
s=s+chunk
|
| 184 |
return out
|
| 185 |
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
|
|
|
| 189 |
|
| 190 |
print (c)
|
| 191 |
#tot=len(purpose)
|
|
@@ -230,7 +231,7 @@ def compress_data_og(c, instruct, history):
|
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
-
def summarize(inp,history,mem_check,data=None):
|
| 234 |
|
| 235 |
json_box=[]
|
| 236 |
error_box=""
|
|
@@ -253,7 +254,7 @@ def summarize(inp,history,mem_check,data=None):
|
|
| 253 |
if i == " " or i=="," or i=="\n":
|
| 254 |
c +=1
|
| 255 |
print (f'c:: {c}')
|
| 256 |
-
json_out = compress_data(c,inp,out)
|
| 257 |
history = [(inp,"Generating Report...")]
|
| 258 |
yield "", history,error_box,json_out
|
| 259 |
|
|
@@ -266,7 +267,7 @@ def summarize(inp,history,mem_check,data=None):
|
|
| 266 |
if i == " " or i=="," or i=="\n":
|
| 267 |
c +=1
|
| 268 |
print (f'c2:: {c}')
|
| 269 |
-
rawp = compress_data_og(c,inp,out)
|
| 270 |
history.clear()
|
| 271 |
history.append((inp,rawp))
|
| 272 |
|
|
|
|
| 142 |
return resp
|
| 143 |
|
| 144 |
|
| 145 |
+
def compress_data(c, instruct, history, seed):
|
| 146 |
+
#seed=random.randint(1,1000000000)
|
| 147 |
|
| 148 |
print (f'c:: {c}')
|
| 149 |
#tot=len(purpose)
|
|
|
|
| 183 |
s=s+chunk
|
| 184 |
return out
|
| 185 |
|
| 186 |
+
seed=random.randint(1,1000000000)
|
| 187 |
+
|
| 188 |
+
def compress_data_og(c, instruct, history, seed):
|
| 189 |
+
#seed=random.randint(1,1000000000)
|
| 190 |
|
| 191 |
print (c)
|
| 192 |
#tot=len(purpose)
|
|
|
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
+
def summarize(inp,history,mem_check,seed=seed,data=None):
|
| 235 |
|
| 236 |
json_box=[]
|
| 237 |
error_box=""
|
|
|
|
| 254 |
if i == " " or i=="," or i=="\n":
|
| 255 |
c +=1
|
| 256 |
print (f'c:: {c}')
|
| 257 |
+
json_out = compress_data(c,inp,out,seed)
|
| 258 |
history = [(inp,"Generating Report...")]
|
| 259 |
yield "", history,error_box,json_out
|
| 260 |
|
|
|
|
| 267 |
if i == " " or i=="," or i=="\n":
|
| 268 |
c +=1
|
| 269 |
print (f'c2:: {c}')
|
| 270 |
+
rawp = compress_data_og(c,inp,out,seed)
|
| 271 |
history.clear()
|
| 272 |
history.append((inp,rawp))
|
| 273 |
|