PlayerBPlaytime commited on
Commit
cf0131a
1 Parent(s): 8718e9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -41
app.py CHANGED
@@ -6,7 +6,6 @@ from time import sleep
6
  from subprocess import Popen
7
  import faiss
8
  from random import shuffle
9
- import requests
10
  import json, datetime, requests
11
  from gtts import gTTS
12
  now_dir = os.getcwd()
@@ -1482,33 +1481,6 @@ def zip_downloader(model):
1482
  else:
1483
  return f'./weights/{model}.pth', "Could not find Index file."
1484
 
1485
- def search_model(name):
1486
- web_service_url = "https://script.google.com/macros/s/AKfycbyRaNxtcuN8CxUrcA_nHW6Sq9G2QJor8Z2-BJUGnQ2F_CB8klF4kQL--U2r2MhLFZ5J/exec"
1487
- response = requests.post(web_service_url, json={
1488
- 'type': 'search_by_filename',
1489
- 'name': name
1490
- })
1491
- result = []
1492
- response.raise_for_status() # Raises an exception in case of an error
1493
- json_response = response.json()
1494
- cont = 0
1495
- result.append("""| Model Name | URL | Epoch | Sample Rate |
1496
- | ----------- | --- |:-----:|:------------:|
1497
- """)
1498
- yield "<br />".join(result)
1499
- if json_response.get('ok', None):
1500
- for model in json_response['ocurrences']:
1501
- if cont < 20:
1502
- model_name = str(model.get('name', 'N/A')).strip()
1503
- model_url = model.get('url', 'N/A')
1504
- epoch = model.get('epoch', 'N/A')
1505
- sr = model.get('sr', 'N/A')
1506
- line = f"""|{model_name}|<a>{model_url}</a>|{epoch}|{sr}|
1507
- """
1508
- result.append(line)
1509
- yield "".join(result)
1510
- cont += 1
1511
-
1512
  fakeapplio = gr.themes.Base(
1513
  primary_hue="violet",
1514
  secondary_hue="violet",
@@ -2154,19 +2126,7 @@ with gr.Blocks(theme=fakeapplio) as app:
2154
  "Wondering how to train a voice? Join AI HUB Discord Server! https://discord.gg/aihub\n"
2155
  "-------------------------------\n"
2156
  )
2157
-
2158
- with gr.Tab("Search Models"):
2159
- gr.HTML("<h4>Search Models</h4>")
2160
- search_name = gr.Textbox(placeholder="Billie Eillish (RVC v2 - 100 epoch)", label="Name", show_label=True)
2161
-
2162
- # Output
2163
- with gr.Row():
2164
- search_output = gr.Markdown(label="Output")
2165
-
2166
- btn_search_model = gr.Button(value="Search")
2167
-
2168
- with gr.Row():
2169
- btn_search_model.click(fn=search_model, inputs=[search_name], outputs=[search_output])
2170
 
2171
  app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=False)
2172
  #endregion
 
6
  from subprocess import Popen
7
  import faiss
8
  from random import shuffle
 
9
  import json, datetime, requests
10
  from gtts import gTTS
11
  now_dir = os.getcwd()
 
1481
  else:
1482
  return f'./weights/{model}.pth', "Could not find Index file."
1483
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1484
  fakeapplio = gr.themes.Base(
1485
  primary_hue="violet",
1486
  secondary_hue="violet",
 
2126
  "Wondering how to train a voice? Join AI HUB Discord Server! https://discord.gg/aihub\n"
2127
  "-------------------------------\n"
2128
  )
2129
+
 
 
 
 
 
 
 
 
 
 
 
 
2130
 
2131
  app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=False)
2132
  #endregion