TIMBOVILL commited on
Commit
7a754b5
·
verified ·
1 Parent(s): fac0678

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -23
app.py CHANGED
@@ -1481,31 +1481,9 @@ def zip_downloader(model):
1481
  else:
1482
  return f'./weights/{model}.pth', "Could not find Index file."
1483
 
1484
- def remove_invalid_chars(text):
1485
- pattern = re.compile(r"[^\x00-\x7F]+")
1486
- return pattern.sub("", text)
1487
-
1488
-
1489
- def remove_text_between_parentheses(lines, start_line, end_line):
1490
- pattern = r"\[([^\]]*)\]\([^)]*\)"
1491
- processed_lines = []
1492
- for line_number, line in enumerate(lines, start=1):
1493
- if start_line <= line_number <= end_line:
1494
- modified_line = re.sub(pattern, r"\1", line)
1495
- processed_lines.append(modified_line)
1496
- else:
1497
- processed_lines.append(line)
1498
-
1499
- return "\n".join(processed_lines)
1500
-
1501
-
1502
- with open("README.md", "r", encoding="utf8") as f:
1503
  inforeadme = f.read()
1504
 
1505
- inforeadme = remove_text_between_parentheses(inforeadme.split("\n"), 6, 17)
1506
- inforeadme = remove_invalid_chars(inforeadme)
1507
- inforeadme = remove_text_between_parentheses(inforeadme.split("\n"), 191, 207)
1508
-
1509
  my_theme = gr.Theme.from_hub("ParityError/LimeFace")
1510
 
1511
  with gr.Blocks(theme=my_theme) as app:
 
1481
  else:
1482
  return f'./weights/{model}.pth', "Could not find Index file."
1483
 
1484
+ with open("amongus.md", "r", encoding="utf8") as f:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1485
  inforeadme = f.read()
1486
 
 
 
 
 
1487
  my_theme = gr.Theme.from_hub("ParityError/LimeFace")
1488
 
1489
  with gr.Blocks(theme=my_theme) as app: