lorenzoscottb commited on
Commit
236b3b9
1 Parent(s): 01c51a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -52,20 +52,13 @@ A T5 model tuned to perform text generation, and predict which characters are pr
52
  """
53
 
54
  examples = [
55
- ["I was followed by the blue monster but was not scared. I was calm and relaxed."],
56
- ["Ero seguito dal mostro blu, ma non ero spaventato. Ero calmo e rilassato."],
57
- ["Śledził mnie niebieski potwór, ale się nie bałem. Byłem spokojny i zrelaksowany."],
58
  ]
59
 
60
  examples_g = [
61
- ["I'm in an auditorium. Susie S is concerned at her part in this disability awareness spoof we are preparing. I ask, 'Why not do it? Lots of AB's represent us in a patronizing way. Why shouldn't we represent ourselves in a good, funny way?' I watch the video we all made. It is funny. I try to sit on a folding chair. Some guy in front talks to me. Merle is in the audience somewhere. [BL]"],
62
-
63
- ]
64
-
65
- examples_re = [
66
- ["I was skating on the outdoor ice pond that used to be across the street from my house. I was not alone, but I did not recognize any of the other people who were skating around. I went through my whole repertoire of jumps, spires, and steps-some of which I can do and some of which I'm not yet sure of. They were all executed flawlessly-some I repeated, some I did only once. I seemed to know that if I went into competition, I would be sure of coming in third because there were only three contestants. Up to that time I hadn't considered it because I hadn't thought I was good enough, but now since everything was going so well, I decided to enter."],
67
- ["I was talking on the telephone to the father of an old friend of mine (boy, 21 years old). We were discussing the party the Saturday night before to which I had invited his son as a guest. I asked him if his son had a good time at the party. He told me not to tell his son that he had told me, but that he had had a good time, except he was a little surprised that I had acted the way I did."],
68
- ["I was walking alone with my dog in a forest."]
69
  ]
70
 
71
  interface_words = gr.Interface(
@@ -91,10 +84,12 @@ def predict(text):
91
  interface_model_S = gr.Interface(
92
  fn=pipe_S,
93
  inputs='text',
94
- outputs=gr.Label',
95
- examples=examples[0],
96
  title="SA Base English-Only",
97
  description=description_S,
 
 
 
98
  cache_examples=True,
99
 
100
  )
 
52
  """
53
 
54
  examples = [
55
+ "I was followed by the blue monster but was not scared. I was calm and relaxed.",
56
+ "Ero seguito dal mostro blu, ma non ero spaventato. Ero calmo e rilassato.",
57
+ "Śledził mnie niebieski potwór, ale się nie bałem. Byłem spokojny i zrelaksowany.",
58
  ]
59
 
60
  examples_g = [
61
+ "I'm in an auditorium. Susie S is concerned at her part in this disability awareness spoof we are preparing. I ask, 'Why not do it? Lots of AB's represent us in a patronizing way. Why shouldn't we represent ourselves in a good, funny way?' I watch the video we all made. It is funny. I try to sit on a folding chair. Some guy in front talks to me. Merle is in the audience somewhere. [BL]"],
 
 
 
 
 
 
 
62
  ]
63
 
64
  interface_words = gr.Interface(
 
84
  interface_model_S = gr.Interface(
85
  fn=pipe_S,
86
  inputs='text',
87
+ outputs=gr.Label,
 
88
  title="SA Base English-Only",
89
  description=description_S,
90
+ examples = [
91
+ "I was followed by the blue monster but was not scared. I was calm and relaxed.",
92
+ ]
93
  cache_examples=True,
94
 
95
  )