Pendrokar commited on
Commit
481d982
1 Parent(s): 6973050

more descr

Browse files
Files changed (2) hide show
  1. README.md +3 -1
  2. app.py +9 -6
README.md CHANGED
@@ -22,4 +22,6 @@ models:
22
  - WhisperSpeech/WhisperSpeech
23
  - SWivid/F5-TTS
24
  sdk_version: 5.4.0
25
- ---
 
 
 
22
  - WhisperSpeech/WhisperSpeech
23
  - SWivid/F5-TTS
24
  sdk_version: 5.4.0
25
+ ---
26
+
27
+ [Saved votes](https://huggingface.co/datasets/Pendrokar/open_tts_tracker)
app.py CHANGED
@@ -419,6 +419,7 @@ cached_samples: List[Sample] = []
419
  voting_users = {
420
  # userid as the key and USER() as the value
421
  }
 
422
  top_five = []
423
 
424
  def generate_matching_pairs(samples: List[Sample]) -> List[Tuple[Sample, Sample]]:
@@ -594,7 +595,7 @@ if SPACE_ID:
594
  request = f"""
595
  ### Request a model
596
 
597
- Please [create a Discussion](https://huggingface.co/spaces/{SPACE_ID}/discussions/new) to request a model.
598
  """
599
  ABOUT = f"""
600
  ## 📄 About
@@ -611,7 +612,7 @@ The leaderboard allows a user to enter text, which will be synthesized by two mo
611
 
612
  ### Credits
613
 
614
- Thank you to the following individuals who helped make this project possible:
615
 
616
  * VB ([Twitter](https://twitter.com/reach_vb) / [Hugging Face](https://huggingface.co/reach-vb))
617
  * Clémentine Fourrier ([Twitter](https://twitter.com/clefourrier) / [Hugging Face](https://huggingface.co/clefourrier))
@@ -622,6 +623,8 @@ Thank you to the following individuals who helped make this project possible:
622
  * Apolinário Passos ([Twitter](https://twitter.com/multimodalart) / [Hugging Face](https://huggingface.co/multimodalart))
623
  * Pedro Cuenca ([Twitter](https://twitter.com/pcuenq) / [Hugging Face](https://huggingface.co/pcuenq))
624
 
 
 
625
  {request}
626
 
627
  ### Privacy statement
@@ -853,7 +856,7 @@ def make_link_to_space(model_name, for_leaderboard=False):
853
  return '🤗 <a target="_blank" style="'+ style +'" title="'+ title +'" href="'+ 'https://huggingface.co/spaces/'+ model_name +'">'+ model_basename +'</a>'
854
 
855
  # otherwise just return the model name
856
- return model_name
857
 
858
  def markdown_link_to_space(model_name):
859
  # create a anchor link if a HF space using markdown syntax
@@ -1060,8 +1063,8 @@ def synthandreturn(text, request: gr.Request):
1060
 
1061
  # re-attempt if necessary
1062
  attempt_count = 0
1063
- while attempt_count < 1:
1064
- # while attempt_count < 3: # May cause 429 Too Many Request
1065
  try:
1066
  if model in AVAILABLE_MODELS:
1067
  if '/' in model:
@@ -1128,7 +1131,7 @@ def synthandreturn(text, request: gr.Request):
1128
  # Fetch and store client again
1129
  # hf_clients[model] = Client(model, hf_token=hf_token, headers=hf_headers)
1130
 
1131
- if attempt_count > 2:
1132
  raise gr.Error(f"{model}: Failed to call model")
1133
  else:
1134
  print('Done with', model)
 
419
  voting_users = {
420
  # userid as the key and USER() as the value
421
  }
422
+ # top five models in order to always have one of them picked and scrutinized
423
  top_five = []
424
 
425
  def generate_matching_pairs(samples: List[Sample]) -> List[Tuple[Sample, Sample]]:
 
595
  request = f"""
596
  ### Request a model
597
 
598
+ Clone the repo of this space, add your model by adding the parameters required of the HF Space. Then make a pull request to {SPACE_ID}.
599
  """
600
  ABOUT = f"""
601
  ## 📄 About
 
612
 
613
  ### Credits
614
 
615
+ Thank you to the following individuals who helped make this* project possible:
616
 
617
  * VB ([Twitter](https://twitter.com/reach_vb) / [Hugging Face](https://huggingface.co/reach-vb))
618
  * Clémentine Fourrier ([Twitter](https://twitter.com/clefourrier) / [Hugging Face](https://huggingface.co/clefourrier))
 
623
  * Apolinário Passos ([Twitter](https://twitter.com/multimodalart) / [Hugging Face](https://huggingface.co/multimodalart))
624
  * Pedro Cuenca ([Twitter](https://twitter.com/pcuenq) / [Hugging Face](https://huggingface.co/pcuenq))
625
 
626
+ \* ***You are currently in a cloned/forked space of TTS-AGI/TTS-Arena***
627
+
628
  {request}
629
 
630
  ### Privacy statement
 
856
  return '🤗 <a target="_blank" style="'+ style +'" title="'+ title +'" href="'+ 'https://huggingface.co/spaces/'+ model_name +'">'+ model_basename +'</a>'
857
 
858
  # otherwise just return the model name
859
+ return '<span style="'+ style +'" title="'+ title +'" href="'+ 'https://huggingface.co/spaces/'+ model_name +'">'+ model_name +'</span>'
860
 
861
  def markdown_link_to_space(model_name):
862
  # create a anchor link if a HF space using markdown syntax
 
1063
 
1064
  # re-attempt if necessary
1065
  attempt_count = 0
1066
+ max_attempts = 1 # 3 =May cause 429 Too Many Request
1067
+ while attempt_count < max_attempts:
1068
  try:
1069
  if model in AVAILABLE_MODELS:
1070
  if '/' in model:
 
1131
  # Fetch and store client again
1132
  # hf_clients[model] = Client(model, hf_token=hf_token, headers=hf_headers)
1133
 
1134
+ if attempt_count >= max_attempts:
1135
  raise gr.Error(f"{model}: Failed to call model")
1136
  else:
1137
  print('Done with', model)