AlGe commited on
Commit
d79b3e8
·
verified ·
1 Parent(s): 2bf0a50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -67,6 +67,15 @@ def process_classification(text, model1, model2, tokenizer1):
67
  def all(text):
68
  return process_ner(text, pipe_bin), process_ner(text, pipe_ext), process_classification(text, model1, model2, tokenizer1)[0], process_classification(text, model1, model2, tokenizer1)[1], process_classification(text, model1, model2, tokenizer1)[2]
69
 
 
 
 
 
 
 
 
 
 
70
  # Define Gradio interface
71
  iface = gr.Interface(
72
  fn=all,
@@ -80,6 +89,7 @@ iface = gr.Interface(
80
  ],
81
  title="Autobiographical Memory Scoring Demo",
82
  description="Precision Memory Analysis: This demo combines two text - and two sequence classification models to showcase our automated Autobiographical Interview scoring Method. Enter a narrative to see the results.",
 
83
  theme="monochrome"
84
  )
85
 
 
67
  def all(text):
68
  return process_ner(text, pipe_bin), process_ner(text, pipe_ext), process_classification(text, model1, model2, tokenizer1)[0], process_classification(text, model1, model2, tokenizer1)[1], process_classification(text, model1, model2, tokenizer1)[2]
69
 
70
+ examples = [
71
+ ['Das ist mir sehr schwer gefallen – warum auch immer - mir das vorzustellen. Klar ist es eigentlich eine negative Geschichte aber so richtig … Gut, es ist halt nur ein Koffer, also auch nur Sachen drin.. das ist auch nur Geld und mir gehts gut. So richtig wusste ich nicht, wohin ich gerade geflogen bin oder überhaupt, ob allein o der mit irgend jemandem oder irgendetwas. Ich hatte da so ein bisschen eine Blockade. Ist mir schwierig gefallen, es mir vorzustellen. Es war jetzt nicht sonderlich dramatisch.'],
72
+ ['Bevor ich meinen Hund kaufte bin ich immer alleine durch den Park gelaufen. Gestern war ich aber mit dem Hund losgelaufen. Das Wetter war sehr schön, nicht wie sonst im Winter. Ich weiß nicht genau. Mir fällt sonst nichts dazu ein. Wir trafen auf mehrere Spaziergänger. Ein Mann mit seinem Kind. Das Kind hat ein Eis gegessen.'],
73
+ ['Also, ich kann mir total vorstellen, dass ich in so zwei Jahren eine mega Geburtstagsparty für meinen besten Freund organisieren werde. Also, das wird echt krass, ich schwöre es dir. Ich werde eine coole Location finden, wahrscheinlich so ein Haus am See oder so, und dann lade ich echt alle seine Freunde und Familie ein. Und dann, das wird der Hammer, ich werde eine Band organisieren, die so seine ganze Lieblingsmusik spielt, weißt du? Und dann, weil ich ja keine Lust habe, selbst zu kochen, hol ich mir so einen professionellen Catering-Service, die dann für alle Gäste kochen. Na ja, ich hoff mal, dass das Wetter mitspielt und wir alle draußen feiern können. Ich sag dir, das wird echt ne unvergessliche Feier, und mein Freund wird ausflippen vor Überraschung, echt jetzt.'],
74
+ ["So, I really imagine that in two years, I'll finally be living my dream and writing a novel. I'll find a quiet place where I can fully concentrate on writing. I'll tell a story that really engages me and that I want to share with others. I'll draw inspiration from my experiences and the people around me, just like in real life. I'll spend many hours putting my thoughts on paper and bringing my characters to life. Well, I hope that readers also find my story fascinating; that would be really cool."],
75
+ ['Oh mein Gott, ich muss dir diese total lustige Geschichte aus meiner Schulzeit erzählen! Du wirst es nicht glauben. Also, ich kam eines Tages zu spät zur Schule, richtig? Du weißt, wie das ist, man ist in Eile und achtet nicht wirklich darauf. Ich habe einfach ein Paar Schuhe gegriffen und bin aus dem Haus gerannt. Erst als ich in der Schule war und mich zum Mittagessen hinsetzte, bemerkte ich, dass ich zwei völlig unterschiedliche Schuhe anhatte! Ich hatte einen schwarzen und einen weißen Turnschuh an. Und ich mache keine Witze, die Leute haben es sofort bemerkt. Ein Typ namens Tommy hat mich Mismatch Mike genannt und bald haben alle mitgemacht. Oh Mann, ich war damals so peinlich berührt! Jetzt finde ich es einfach nur witzig und frage mich, wie mir das nicht aufgefallen ist. Das ist eine dieser Geschichten, die ich jetzt auf Partys erzähle, und die Leute finden es total lustig.'],
76
+ ["You know, this conversation reminded me of an incredible experience I had at a music festival in college. I'll never forget it. It was a rainy day, but we didn't care, and the band that was playing was my absolute favorite. Even though we were all soaked, the crowd kept on dancing and singing along. The energy was incredible, and I remember feeling so connected to everyone around me. It was as if the rain made the whole experience even more magical. I was surrounded by friends, and we all shared this special moment together. It was one of the best moments of my life, and I still get goosebumps when I think about it. Sometimes, it's the unexpected things that create the most amazing memories, you know?"],
77
+ ]
78
+
79
  # Define Gradio interface
80
  iface = gr.Interface(
81
  fn=all,
 
89
  ],
90
  title="Autobiographical Memory Scoring Demo",
91
  description="Precision Memory Analysis: This demo combines two text - and two sequence classification models to showcase our automated Autobiographical Interview scoring Method. Enter a narrative to see the results.",
92
+ examples =examples,
93
  theme="monochrome"
94
  )
95