Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,13 +47,21 @@ def prediction(text):
|
|
| 47 |
return summary,org_len,sum_len
|
| 48 |
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
outputs = [
|
| 58 |
gr.Textbox(lines =5,label = "Summarization of text"),
|
| 59 |
gr.Number(label="Word Count of given Text"),
|
|
@@ -65,6 +73,7 @@ demo_app = gr.Interface(
|
|
| 65 |
inputs=gr.Textbox(lines =10,label = " Enter the Text", max_lines = 20),
|
| 66 |
outputs= outputs,
|
| 67 |
title = "Text Summarization",
|
|
|
|
| 68 |
#description = DESCRIPTION,
|
| 69 |
#cache_example = True,
|
| 70 |
#live = True,
|
|
|
|
| 47 |
return summary,org_len,sum_len
|
| 48 |
|
| 49 |
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
EXAMPLES = ["""
|
| 53 |
+
Maria Sharapova has basically no friends as tennis players on the WTA Tour. The Russian player has no problems in openly speaking about it and in a recent interview she said: 'I don't really hide any feelings too much.
|
| 54 |
+
I think everyone knows this is my job here. When I'm on the courts or when I'm on the court playing, I'm a competitor and I want to beat every single person whether they're in the locker room or across the net.
|
| 55 |
+
So I'm not the one to strike up a conversation about the weather and know that in the next few minutes I have to go and try to win a tennis match.
|
| 56 |
+
I'm a pretty competitive girl. I say my hellos, but I'm not sending any players flowers as well. Uhm, I'm not really friendly or close to many players.
|
| 57 |
+
I have not a lot of friends away from the courts.' When she said she is not really close to a lot of players, is that something strategic that she is doing? Is it different on the men's tour than the women's tour? 'No, not at all.
|
| 58 |
+
I think just because you're in the same sport doesn't mean that you have to be friends with everyone just because you're categorized, you're a tennis player, so you're going to get along with tennis players.
|
| 59 |
+
I think every person has different interests. I have friends that have completely different jobs and interests, and I've met them in very different parts of my life.
|
| 60 |
+
I think everyone just thinks because we're tennis players we should be the greatest of friends. But ultimately tennis is just a very small part of what we do.
|
| 61 |
+
There are so many other things that we're interested in, that we do.'
|
| 62 |
+
"""]
|
| 63 |
+
|
| 64 |
+
|
| 65 |
outputs = [
|
| 66 |
gr.Textbox(lines =5,label = "Summarization of text"),
|
| 67 |
gr.Number(label="Word Count of given Text"),
|
|
|
|
| 73 |
inputs=gr.Textbox(lines =10,label = " Enter the Text", max_lines = 20),
|
| 74 |
outputs= outputs,
|
| 75 |
title = "Text Summarization",
|
| 76 |
+
examples = EXAMPLES,
|
| 77 |
#description = DESCRIPTION,
|
| 78 |
#cache_example = True,
|
| 79 |
#live = True,
|