output headlines
Browse files
app.py
CHANGED
@@ -439,7 +439,7 @@ def topic_summarization(topic_groups):
|
|
439 |
|
440 |
result = tokenizer.decode(beam_outputs[0])
|
441 |
print(result)
|
442 |
-
headlines
|
443 |
|
444 |
return headlines
|
445 |
|
@@ -554,7 +554,7 @@ def main(dataset, model, progress=gr.Progress(track_tqdm=True)):
|
|
554 |
print('doing topic summarization')
|
555 |
headlines = topic_summarization(top_tweets)
|
556 |
headlines = '\n'.join(str(h) for h in headlines)
|
557 |
-
print(headlines)
|
558 |
|
559 |
|
560 |
|
@@ -573,8 +573,7 @@ iface = gr.Interface(fn=main,
|
|
573 |
label="Model")
|
574 |
],
|
575 |
# examples=examples,
|
576 |
-
outputs=[
|
577 |
-
"text",
|
578 |
"text"],
|
579 |
enable_queue=True,
|
580 |
debug=True,
|
|
|
439 |
|
440 |
result = tokenizer.decode(beam_outputs[0])
|
441 |
print(result)
|
442 |
+
headlines.append("Topic " + str(i) + " " + result)
|
443 |
|
444 |
return headlines
|
445 |
|
|
|
554 |
print('doing topic summarization')
|
555 |
headlines = topic_summarization(top_tweets)
|
556 |
headlines = '\n'.join(str(h) for h in headlines)
|
557 |
+
# print(headlines)
|
558 |
|
559 |
|
560 |
|
|
|
573 |
label="Model")
|
574 |
],
|
575 |
# examples=examples,
|
576 |
+
outputs=["text",
|
|
|
577 |
"text"],
|
578 |
enable_queue=True,
|
579 |
debug=True,
|