teragron commited on
Commit
ba73aa3
1 Parent(s): 8ef870e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -1,9 +1,21 @@
 
1
  import subprocess
2
  import gradio as gr
3
 
4
- #model_file = "best_model_4800it_40M.bin"
 
 
5
 
6
- model_list = ["best_model_4800it_40M.bin", "model_2200.bin", "model_4200.bin", "model_2200_tr_corpus.bin", "model_8k.bin", "model_1600.bin", "model_3600.bin"]
 
 
 
 
 
 
 
 
 
7
 
8
  try:
9
  subprocess.run(["make", "runfast"], check=True, shell=True)
 
1
+ import os
2
  import subprocess
3
  import gradio as gr
4
 
5
+ def list_bin_files():
6
+ # Get the current directory
7
+ current_directory = os.getcwd()
8
 
9
+ # List all files in the current directory
10
+ all_files = os.listdir(current_directory)
11
+
12
+ # Filter files with the ".bin" extension
13
+ bin_files = [file for file in all_files if file.endswith(".bin")]
14
+
15
+ return bin_files
16
+
17
+ # Call the function to get the list of ".bin" files
18
+ model_list = list_bin_files()
19
 
20
  try:
21
  subprocess.run(["make", "runfast"], check=True, shell=True)