rdlf commited on
Commit
ca0af61
·
verified ·
1 Parent(s): 2f773dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  from PIL import Image
3
  from groq import Groq
4
  import os
 
5
 
6
  st.image('calamo.png', caption="", use_column_width=False)
7
 
@@ -16,9 +17,6 @@ synthesizer = pipeline("text-to-speech", "suno/bark")
16
  client = Groq(
17
  api_key=os.environ.get("GROQ_API_KEY"),
18
  )
19
- # Rest of your Streamlit app
20
- st.write("# Inicio")
21
-
22
  # Other content of your app
23
  st.title("plAIn Voice")
24
  # Add more components here
@@ -54,17 +52,12 @@ def generate_audio(input_text):
54
 
55
  user_input = st.text_input("Pega un texto para aclararlo y escuchar una lectura.")
56
 
57
- if st.button('Convert'):
58
  if user_input == "":
59
- st.write("Please enter some text")
60
  else:
61
  speech_file = text_to_speech(user_input)
62
  st.audio(speech_file, format='audio/wav')
63
 
64
 
65
 
66
- '''# Call the function with the user input
67
- processed_output = process_text(user_input)
68
-
69
- # Display the processed output
70
- st.write('Texto procesado:', processed_output)'''
 
2
  from PIL import Image
3
  from groq import Groq
4
  import os
5
+ from transformers import pipeline
6
 
7
  st.image('calamo.png', caption="", use_column_width=False)
8
 
 
17
  client = Groq(
18
  api_key=os.environ.get("GROQ_API_KEY"),
19
  )
 
 
 
20
  # Other content of your app
21
  st.title("plAIn Voice")
22
  # Add more components here
 
52
 
53
  user_input = st.text_input("Pega un texto para aclararlo y escuchar una lectura.")
54
 
55
+ if st.button('Aclarar'):
56
  if user_input == "":
57
+ st.write("Pega un texto aquí")
58
  else:
59
  speech_file = text_to_speech(user_input)
60
  st.audio(speech_file, format='audio/wav')
61
 
62
 
63