awacke1 commited on
Commit
3b5e4ba
1 Parent(s): b21e985

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -39,7 +39,7 @@ def bulk_function(filename):
39
  return {k: v[idx] for k, v in self.tokenized_texts.items()}
40
 
41
  html = linkify()
42
-
43
 
44
  # load tokenizer and model, create trainer
45
  model_name = "j-hartmann/emotion-english-distilroberta-base"
@@ -132,8 +132,9 @@ def bulk_function(filename):
132
 
133
  gr.Interface(bulk_function,
134
  inputs=[gr.inputs.File(file_count="single", type="file", label="Upload file", optional=False),],
135
- outputs=[gr.outputs.File(label="Output file")],
136
  # examples=[["YOUR_FILENAME.csv"]], # computes, doesn't export df so far
 
137
  theme="huggingface",
138
  title="Emotion Classification from CSV",
139
  description="Upload csv file with 2 columns (in order): (a) ID column, (b) text column. Model: https://huggingface.co/j-hartmann/emotion-english-distilroberta-base.",
 
39
  return {k: v[idx] for k, v in self.tokenized_texts.items()}
40
 
41
  html = linkify()
42
+ gradio.HTML(html)
43
 
44
  # load tokenizer and model, create trainer
45
  model_name = "j-hartmann/emotion-english-distilroberta-base"
 
132
 
133
  gr.Interface(bulk_function,
134
  inputs=[gr.inputs.File(file_count="single", type="file", label="Upload file", optional=False),],
135
+ outputs=[["highlight", "json", "html"],gr.outputs.File(label="Output file")],
136
  # examples=[["YOUR_FILENAME.csv"]], # computes, doesn't export df so far
137
+
138
  theme="huggingface",
139
  title="Emotion Classification from CSV",
140
  description="Upload csv file with 2 columns (in order): (a) ID column, (b) text column. Model: https://huggingface.co/j-hartmann/emotion-english-distilroberta-base.",