saritha5 commited on
Commit
3e939b7
1 Parent(s): 0a93cce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -7
app.py CHANGED
@@ -47,13 +47,21 @@ def prediction(text):
47
  return summary,org_len,sum_len
48
 
49
 
50
- #predicted_label, score = occ_predict("img1.jpg")
51
- #inputs = gr.inputs.text(label)
52
- #label = gr.outputs.Label(num_top_classes=2)
53
- #EXAMPLES = ["img1.png","img2.png","img3.png","img10.png","img8.png","img9.png"]
54
- #DESCRIPTION = "Occlusion means the act of closing, blocking or shutting something or the state of being closed or blocked"
55
- #summary = prediction(text)
56
- #print(summary)
 
 
 
 
 
 
 
 
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,