alitavanaali commited on
Commit
d250602
·
1 Parent(s): c0de39e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -280,8 +280,8 @@ def createDataframe(predictions, words):
280
  result1, result2 = zip(*sorted(zip(predictions, words), key=lambda x: x[0]))
281
  d = {'key':result1,'value':result2}
282
  df = pd.DataFrame(d)
283
- df1 = df.loc[df['key'] != 'lyrics']
284
- df2 = df.loc[df['key'] == 'lyrics']
285
  return df1, df2
286
 
287
  def isInside(w, z):
@@ -371,7 +371,7 @@ def completepreprocess(pdffile):
371
  print('page: ' + str(i) + ' ' + str(len(_preds))+ ' ' + str(len(_words)))
372
  df1, df2 = createDataframe(_preds, _words)
373
  dfOne=dfOne.append(df1)
374
- dfTwo=dfOne.append(df2)
375
 
376
  im2=mergeImageVertical(a)
377
  return im2,dfOne,dfTwo
 
280
  result1, result2 = zip(*sorted(zip(predictions, words), key=lambda x: x[0]))
281
  d = {'key':result1,'value':result2}
282
  df = pd.DataFrame(d)
283
+ df1 = df[df['key'] != 'lyrics']
284
+ df2 = df[df['key'] == 'lyrics']
285
  return df1, df2
286
 
287
  def isInside(w, z):
 
371
  print('page: ' + str(i) + ' ' + str(len(_preds))+ ' ' + str(len(_words)))
372
  df1, df2 = createDataframe(_preds, _words)
373
  dfOne=dfOne.append(df1)
374
+ dfTwo=dfTwo.append(df2)
375
 
376
  im2=mergeImageVertical(a)
377
  return im2,dfOne,dfTwo