Gapeleon commited on
Commit
6dfdd44
·
verified ·
1 Parent(s): 38c136c

Remove the preset override.

Browse files

The preset_name is always populated (it has a default value), so it always overrides whatever we type in the description field.
Fix: Removed the override entirely, so the drop-down only pre-fills the fields, rather than overriding them.

Fixes this: https://huggingface.co/spaces/maya-research/maya1/discussions/1

I tested this in a private fork of the space.

Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -138,10 +138,6 @@ def generate_speech(preset_name, description, text, temperature, max_tokens):
138
  # Load models if not already loaded
139
  load_models()
140
 
141
- # If using preset, override description
142
- if preset_name and preset_name in PRESET_CHARACTERS:
143
- description = PRESET_CHARACTERS[preset_name]["description"]
144
-
145
  # Validate inputs
146
  if not description or not text:
147
  return None, "Error: Please provide both description and text!"
 
138
  # Load models if not already loaded
139
  load_models()
140
 
 
 
 
 
141
  # Validate inputs
142
  if not description or not text:
143
  return None, "Error: Please provide both description and text!"