Transformers
English
Not-For-All-Audiences
Inference Endpoints
anotherawesomeday / README.md
thanosswrld's picture
Update README.md
43d70b8 verified
---
license: bsl-1.0
datasets:
- Tele-AI/TeleChat-PTD
- Open-Orca/OpenOrca
- LDJnr/Capybara
- google/MusicCaps
- PolyAI/minds14
- flexthink/ljspeech
language:
- en
library_name: transformers
tags:
- not-for-all-audiences
thumbnail: https://i.imgur.com/BRPy6wP.png
metrics:
- cer
- accuracy
- bertscore
- bleurt
base model: facebook/wav2vec2-base
---
## Another Awesome Day Youth Suicide Prevention Model
![image/png](https://cdn-uploads.huggingface.co/production/uploads/65aaaf762ed95c799f33391b/1MC4fb-XUyRo-doPhNesP.png)
Welcome to the Another Awesome Day Youth Suicide Prevention Model developed by Y3K and powered by NFT CLT LLC. This initiative is part of our commitment to promoting mental well-being and creativity among kids, teens, and young adults.
## About Y3K and NFT CLT LLC
At Y3K, we are dedicated to equipping and empowering students with skills and emerging technologies, fostering leadership, innovation, entrepreneurship, and positive social impact. Through collaboration with student-led organizations, universities, and community hubs, we create safe spaces and provide resources for personal and professional development.
NFT CLT LLC is proud to support the youth suicide prevention initiative titled 'Another Awesome Day.' Our mission is to empower young minds with creative outlets in art, tech, music, games, and more. We firmly believe in the transformative power of expression and connection as tools to prevent suicide.
## Another Awesome Day Initiative
Another Awesome Day is a platform where kids, teens, and young adults can explore interactive art installations, participate in tech workshops, enjoy live music performances, engage with guest speakers, and connect through food, games, and more. It's a collective effort to create a safe space for teens to share, connect, and find support.
## Model Purpose
The Youth Suicide Prevention Model is designed to complement the Another Awesome Day initiative by leveraging technology to promote mental well-being. This model aims to provide support, resources, and a safe environment for individuals navigating the challenges of adolescence and young adulthood.
## Contribution
We welcome contributions from developers who are passionate about mental health, youth empowerment, and creating positive social impact. Feel free to explore the codebase, contribute improvements, and join us in painting a brighter future for our youth.
## Get Involved
Don't miss this unique opportunity to be part of a movement that makes a difference. Join us in promoting mental well-being, creativity, and a sense of community among the youth. Together, let's build a world where every day is Another Awesome Day.
Thank you for your interest and contributions!
— Copyright © 2023 All Rights Reserved by NFTCLT LLC.
---
🧨 Installation 🧨
---
pip install datasets>=1.18.3 transformers==4.11.3 librosa jiwer
---
import transformers
from transformers import AutoModelForSeq2SeqLM
model_one = AutoModelForAudioClassification.from_pretrained("facebook/wav2vec2-base")
feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-base")
from datasets import load_dataset, Audio
import librosa # For audio processing
import jiwer # For evaluating text-to-audio
# Load the model and processor
anotherawesomeday = "facebook/wav2vec2-base"
processor = Wav2Vec2Processor.from_pretrained(anotherawesomeday)
model = AutoModelForSeq2SeqLM.from_pretrained(anotherawesomeday)
# Load model and tokenizer
model_name = "anotherawesomeday"
model = AutoModelForSeq2SeqLM.from_pretrained(anotherawesomeday)
tokenizer = AutoTokenizer.from_pretrained(anotherawesomeday)
# Example: Generate text from input
input_text = "Hello, how are you?"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
output_ids = model.generate(input_ids)
generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(generated_text)
# Load a dataset (example with PolyAI/minds14)
dataset = load_dataset("PolyAI/minds14", "en-US", split="train")
# Preprocess text data
def preprocess_text(text):
# Perform necessary text cleaning and normalization
# ...
return processed_text
# Preprocess audio data
def preprocess_audio(audio_file):
# Load and resample audio to 16kHz using librosa
# ...
return resampled_audio
# Generate text from text input
def generate_text(input_text):
input_ids = processor.tokenizer(input_text, return_tensors="pt").input_ids
output_ids = model.generate(input_ids)
generated_text = processor.tokenizer.decode(output_ids[0], skip_special_tokens=True)
return generated_text
# Generate audio from text input
def generate_audio(input_text):
input_ids = processor.tokenizer(input_text, return_tensors="pt").input_ids
with torch.no_grad():
generated_audio = model.generate(input_ids).squeeze(0).numpy()
# Reconstruct audio using feature extractor
reconstructed_audio = processor.feature_extractor.inverse_transform(generated_audio)
return reconstructed_audio
# Evaluate text-to-text performance (example with accuracy)
def evaluate_text_generation(model, dataset):
# Calculate accuracy or other relevant metrics
# ...
return accuracy_score
# Evaluate text-to-audio performance (example with CER)
def evaluate_audio_generation(model, dataset):
# Calculate CER using jiwer or other audio evaluation tools
# ...
return cer_score
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer