Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ st.write("Distribution for Predicted_F")
|
|
141 |
plot_predictions_distribution(data, 'Predicted_F_encoded', 'Distribution of Predictions for Female Demographic')
|
142 |
st.write("Distribution for Predicted_M")
|
143 |
plot_predictions_distribution(data, 'Predicted_M_encoded', 'Distribution of Predictions for Male Demographic')
|
144 |
-
|
145 |
import streamlit as st
|
146 |
from transformers import pipeline
|
147 |
import re
|
@@ -196,7 +196,7 @@ if st.button("Predict Personality"):
|
|
196 |
displayed = True
|
197 |
if not displayed:
|
198 |
st.write("No predictions exceed the confidence threshold.")
|
199 |
-
|
200 |
import streamlit as st
|
201 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
202 |
import torch
|
@@ -238,4 +238,17 @@ def main():
|
|
238 |
|
239 |
if __name__ == "__main__":
|
240 |
main()
|
241 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
plot_predictions_distribution(data, 'Predicted_F_encoded', 'Distribution of Predictions for Female Demographic')
|
142 |
st.write("Distribution for Predicted_M")
|
143 |
plot_predictions_distribution(data, 'Predicted_M_encoded', 'Distribution of Predictions for Male Demographic')
|
144 |
+
|
145 |
import streamlit as st
|
146 |
from transformers import pipeline
|
147 |
import re
|
|
|
196 |
displayed = True
|
197 |
if not displayed:
|
198 |
st.write("No predictions exceed the confidence threshold.")
|
199 |
+
|
200 |
import streamlit as st
|
201 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
202 |
import torch
|
|
|
238 |
|
239 |
if __name__ == "__main__":
|
240 |
main()
|
241 |
+
"""
|
242 |
+
from TTS.api import TTS
|
243 |
+
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True)
|
244 |
+
|
245 |
+
# generate speech by cloning a voice using default settings
|
246 |
+
tts.tts_to_file(text="A reporter from Gaza, Abdullah Aljamal, who wrote for the American newspaper The Palestine Chronicle, was holding hostages in his home. The Israeli army killed him, and three hostages were rescued from his house. From October 7 to June 8, while the hostages were held captive, Abdullah reported on the horrors of war, highlighting what he described as a genocide by Israel.
|
247 |
+
|
248 |
+
His last pieces didn't mention that the war started after the October 7 massacre and hostage-taking. Instead, he focused on sick children and elderly people suffering because of Israel. Abdullah was listed as an author on The Palestine Chronicle's website. They published articles about his death, denying any involvement in holding hostages.
|
249 |
+
|
250 |
+
The Palestine Chronicle is run by a nonprofit called People Media. Jason Smith, a Missouri State Representative, believes this organization uses its status to support terrorism. Notably, Noam Chomsky, the famous linguist and leftist philosopher, is an honorary member of The Palestine Chronicle's editorial board. He has called the publication "an invaluable source of information and analysis about Palestine."
|
251 |
+
,
|
252 |
+
file_path="output.wav",
|
253 |
+
speaker_wav="speaker.wav",
|
254 |
+
language="en")
|