Pendrokar commited on
Commit
0a214bf
1 Parent(s): 0ce89c9

tokenized+output

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,15 +12,15 @@ pipeline = pipeline(task="text-classification", model=distil_model, tokenizer=di
12
  def predict(deepmoji_analysis):
13
  predictions = pipeline(deepmoji_analysis)
14
 
15
- output_text = ""
16
  for p in predictions:
17
  output_text += p['label'] + ' (' + str(p['score']) + ")\n"
18
- return [distil_tokenizer(deepmoji_analysis)["input_ids"], output_text]
19
 
20
  gradio_app = gr.Interface(
21
  fn=predict,
22
  inputs="text",
23
- outputs=["text", "text"],
24
  examples=[
25
  "This GOT show just remember LOTR times!",
26
  "Man, can't believe that my 30 days of training just got a NaN loss",
 
12
  def predict(deepmoji_analysis):
13
  predictions = pipeline(deepmoji_analysis)
14
 
15
+ output_text = "\n"
16
  for p in predictions:
17
  output_text += p['label'] + ' (' + str(p['score']) + ")\n"
18
+ return str(distil_tokenizer(deepmoji_analysis)["input_ids"]) + output_text
19
 
20
  gradio_app = gr.Interface(
21
  fn=predict,
22
  inputs="text",
23
+ outputs="text",
24
  examples=[
25
  "This GOT show just remember LOTR times!",
26
  "Man, can't believe that my 30 days of training just got a NaN loss",