Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -306,7 +306,8 @@ def inference(input_batch,isurl,use_archive,limit_companies=10):
|
|
| 306 |
for idx in range(len(df.index)):
|
| 307 |
if ner_labels[idx]: #not empty
|
| 308 |
for ner in ner_labels[idx]:
|
| 309 |
-
|
|
|
|
| 310 |
|
| 311 |
return df #ner_labels, {'E':float(prob_outs[0]),"S":float(prob_outs[1]),"G":float(prob_outs[2])},{sentiment['label']:float(sentiment['score'])},"**Summary:**\n\n" + summary
|
| 312 |
|
|
|
|
| 306 |
for idx in range(len(df.index)):
|
| 307 |
if ner_labels[idx]: #not empty
|
| 308 |
for ner in ner_labels[idx]:
|
| 309 |
+
|
| 310 |
+
df = pd.concat( [df, df.loc[[idx]].assign(company=ner[0], sector=ner[1])], join='outer', ignore_index=True) #axis=0
|
| 311 |
|
| 312 |
return df #ner_labels, {'E':float(prob_outs[0]),"S":float(prob_outs[1]),"G":float(prob_outs[2])},{sentiment['label']:float(sentiment['score'])},"**Summary:**\n\n" + summary
|
| 313 |
|