salomonsky commited on
Commit
3ab8e88
·
verified ·
1 Parent(s): 1723905

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,7 +34,7 @@ def text_to_speech(text, speed=1.3):
34
 
35
  return audio_file_path
36
 
37
- def generate(user_input, history, temperature=None, max_new_tokens=1024, top_p=0.95, repetition_penalty=1.0):
38
  global pre_prompt_sent
39
  temperature = float(temperature) if temperature is not None else 0.9
40
  if temperature < 1e-2:
@@ -68,13 +68,13 @@ def generate(user_input, history, temperature=None, max_new_tokens=1024, top_p=0
68
  if "history" not in st.session_state:
69
  st.session_state.history = []
70
 
 
71
  output, audio_bytes = generate(user_input, history=st.session_state.history)
72
 
73
  if user_input:
74
  st.session_state.history.append((user_input, output))
75
 
76
- user_input = st.text_input(label="", value="")
77
- st.text_area("Respuesta del Chatbot", value=output, height=400, key="output_text", disabled=True)
78
 
79
  st.markdown(
80
  f"""
 
34
 
35
  return audio_file_path
36
 
37
+ def generate(user_input, history, temperature=None, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0):
38
  global pre_prompt_sent
39
  temperature = float(temperature) if temperature is not None else 0.9
40
  if temperature < 1e-2:
 
68
  if "history" not in st.session_state:
69
  st.session_state.history = []
70
 
71
+ user_input = st.text_input(label="", value="")
72
  output, audio_bytes = generate(user_input, history=st.session_state.history)
73
 
74
  if user_input:
75
  st.session_state.history.append((user_input, output))
76
 
77
+ st.text_area("Salida del Chatbot", value=output, height=400, key="output_text", disabled=True)
 
78
 
79
  st.markdown(
80
  f"""