Liam Dyer commited on
Commit
15d68b8
1 Parent(s): a954cfa

feat: more plain text file types

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -79,7 +79,17 @@ def convert_pandoc(input_file, filename):
79
 
80
  @spaces.GPU
81
  def convert(input_file, filename):
82
- plain_text_filetypes = [".txt", ".csv", ".tsv", ".md"]
 
 
 
 
 
 
 
 
 
 
83
  # Already a plain text file that wouldn't benefit from pandoc so return the content
84
  if any(filename.endswith(ft) for ft in plain_text_filetypes):
85
  with open(input_file, "r") as f:
 
79
 
80
  @spaces.GPU
81
  def convert(input_file, filename):
82
+ plain_text_filetypes = [
83
+ ".txt",
84
+ ".csv",
85
+ ".tsv",
86
+ ".md",
87
+ ".yaml",
88
+ ".toml",
89
+ ".json",
90
+ ".json5",
91
+ ".jsonc",
92
+ ]
93
  # Already a plain text file that wouldn't benefit from pandoc so return the content
94
  if any(filename.endswith(ft) for ft in plain_text_filetypes):
95
  with open(input_file, "r") as f: