KawshikManikantan commited on
Commit
0d75905
1 Parent(s): 5dc94a0

large_example

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. example_harry.txt +145 -0
app.py CHANGED
@@ -116,6 +116,8 @@ def download_json():
116
  return gr.DownloadButton(visible=False)
117
 
118
 
 
 
119
  options = ["static", "hybrid"]
120
 
121
  with gr.Blocks() as demo:
@@ -146,7 +148,8 @@ with gr.Blocks() as demo:
146
  "example",
147
  "{{Harry}} went to Hogwarts to meet Hemoine and {{Ron}} . He also met Ron's mother at the railway station.",
148
  "static",
149
- ]
 
150
  ],
151
  )
152
 
 
116
  return gr.DownloadButton(visible=False)
117
 
118
 
119
+ with open("example_harry.txt", "r") as f:
120
+ example_harry = f.read()
121
  options = ["static", "hybrid"]
122
 
123
  with gr.Blocks() as demo:
 
148
  "example",
149
  "{{Harry}} went to Hogwarts to meet Hemoine and {{Ron}} . He also met Ron's mother at the railway station.",
150
  "static",
151
+ ],
152
+ ["example_large", example_harry, "static"],
153
  ],
154
  )
155
 
example_harry.txt ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ As they entered November, the weather turned very cold. The mountains
2
+ around the school became icy gray and the lake like chilled steel. Every
3
+ morning the ground was covered in frost. Hagrid could be seen from the
4
+ upstairs windows defrosting broomsticks on the Quidditch field, bundled
5
+ up in a long moleskin overcoat, rabbit fur gloves, and enormous
6
+ beaverskin boots.
7
+
8
+ The Quidditch season had begun. On Saturday, {{Harry}} would be playing in
9
+ his first match after weeks of training: Gryffindor versus Slytherin. If
10
+ Gryffindor won, they would move up into second place in the house
11
+ championship.
12
+
13
+ Hardly anyone had seen Harry play because Wood had decided that, as
14
+ their secret weapon, Harry should be kept, well, secret. But the news
15
+ that he was playing Seeker had leaked out somehow, and Harry didn't know
16
+ which was worse -- people telling him he'd be brilliant or people
17
+ telling him they'd be running around underneath him holding a mattress.
18
+
19
+ It was really lucky that Harry now had {{Hermlone}} as a friend. He didn't
20
+ know how he'd have gotten through all his homework without her, what
21
+ with all the last-minute Quidditch practice Wood was making them do. She
22
+ had also tent him Quidditch Through the Ages, which turned out to be a
23
+ very interesting read.
24
+
25
+ Harry learned that there were seven hundred ways of committing a
26
+ Quidditch foul and that all of them had happened during a World Cup
27
+ match in 1473; that Seekers were usually the smallest and fastest
28
+ players, and that most serious Quidditch accidents seemed to happen to
29
+ them; that although people rarely died playing Quidditch, referees had
30
+ been known to vanish and turn up months later in the Sahara Desert.
31
+
32
+ Hermione had become a bit more relaxed about breaking rules since Harry
33
+ and Ron had saved her from the mountain troll, and she was much nicer
34
+ for it. The day before Harry's first Quidditch match the three of them
35
+ were out in the freezing courtyard during break, and she had conjured
36
+ them up a bright blue fire that could be carried around in a jam jar.
37
+ They were standing with their backs to it, getting warm, when Snape
38
+ crossed the yard. Harry noticed at once that Snape was limping. Harry,
39
+ Ron, and Hermione moved closer together to block the fire from view;
40
+ they were sure it wouldn't be allowed. Unfortunately, something about
41
+ their guilty faces caught Snape's eye. He limped over. He hadn't seen
42
+ the fire, but he seemed to be looking for a reason to tell them off
43
+ anyway.
44
+
45
+ "What's that you've got there, Potter?"
46
+
47
+ It was Quidditch Through the Ages. Harry showed him.
48
+
49
+ "Library books are not to be taken outside the school," said Snape.
50
+ "Give it to me. Five points from Gryffindor."
51
+
52
+ "He's just made that rule up," Harry muttered angrily as Snape limped
53
+ away. "Wonder what's wrong with his leg?"
54
+
55
+ "Dunno, but I hope it's really hurting him," said {{Ron}} bitterly.
56
+
57
+ The Gryffindor common room was very noisy that evening. Harry, Ron, and
58
+ Hermione sat together next to a window. Hermione was checking Harry and
59
+ Ron's Charms homework for them. She would never let them copy ("How will
60
+ you learn?"), but by asking her to read it through, they got the right
61
+ answers anyway.
62
+
63
+ Harry felt restless. He wanted Quidditch Through the Ages back, to take
64
+ his mind off his nerves about tomorrow. Why should he be afraid of
65
+ Snape? Getting up, he told Ron and Hermione he was going to ask Snape if
66
+ he could have it.
67
+
68
+ "Better you than me," they said together, but Harry had an idea that
69
+ Snape wouldn't refuse if there were other teachers listening.
70
+
71
+ He made his way down to the staffroom and knocked. There was no answer.
72
+ He knocked again. Nothing.
73
+
74
+ Perhaps Snape had left the book in there? It was worth a try. He pushed
75
+ the door ajar and peered inside -- and a horrible scene met his eyes.
76
+
77
+ Snape and Filch were inside, alone. Snape was holding his robes above
78
+ his knees. One of his legs was bloody and mangled. Filch was handing
79
+ Snape bandages.
80
+
81
+ "Blasted thing*," Snape was saying. "How are you supposed to keep your
82
+ eyes on all three heads at once?"
83
+
84
+ Harry tried to shut the door quietly, but --
85
+
86
+ "POTTER!"
87
+
88
+ Snape's face was twisted with fury as he dropped his robes quickly to
89
+ hide his leg. Harry gulped.
90
+
91
+ "I just wondered if I could have my book back."
92
+
93
+ "GET OUT! OUT!"
94
+
95
+ Harry left, before Snape could take any more points from Gryffindor. He
96
+ sprinted back upstairs.
97
+
98
+ "Did you get it?" Ron asked as Harry joined them. "What's the matter?"
99
+
100
+ In a low whisper, Harry told them what he'd seen.
101
+
102
+ "You know what this means?" he finished breathlessly. "He tried to get
103
+ past that three-headed dog at Halloween! That's where he was going when
104
+ we saw him -- he's after whatever it's guarding! And Id bet my
105
+ broomstick he let that troll in, to make a diversion!"
106
+
107
+ Hermione's eyes were wide.
108
+
109
+ "No -- he wouldn't, she said. "I know he's not very nice, but he
110
+ wouldn't try and steal something Dumbledore was keeping safe."
111
+
112
+ "Honestly, Hermione, you think all teachers are saints or something,"
113
+ snapped Ron. "I'm with Harry. I wouldn't put anything past Snape. But
114
+ what's he after? What's that dog guarding?"
115
+
116
+ Harry went to bed with his head buzzing with the same question. Neville
117
+ was snoring loudly, but Harry couldn't sleep. He tried to empty his mind
118
+ -- he needed to sleep, he had to, he had his first Quidditch match in a
119
+ few hours -- but the expression on Snape's face when Harry had seen his
120
+ leg wasn't easy to forget.
121
+
122
+ The next morning dawned very bright and cold. The Great Hall was full of
123
+ the delicious smell of fried sausages and the cheer ful chatter of
124
+ everyone looking forward to a good Quidditch match.
125
+
126
+ "You've got to eat some breakfast."
127
+
128
+ "I don't want anything."
129
+
130
+ "Just a bit of toast," wheedled Hermione.
131
+
132
+ "I'm not hungry."
133
+
134
+ Harry felt terrible. In an hour's time he'd be walking onto the field.
135
+
136
+ "Harry, you need your strength," said Seamus Finnigan. "Seekers are
137
+ always the ones who get clobbered by the other team."
138
+
139
+ "Thanks, Seamus," said Harry, watching Seamus pile ketchup on his
140
+ sausages.
141
+
142
+ By eleven o'clock the whole school seemed to be out in the stands around
143
+ the Quidditch pitch. Many students had binoculars. The seats might be
144
+ raised high in the air, but it was still difficult to see what was going
145
+ on sometimes.