Skip to content

SynthiaGPT leverages Google's Gemini & the Hugging Face Transformers library to interact with a pre-trained GPT-2 model. It employs TensorFlow for model management and AutoTokenizer for efficient tokenization. The script enables users to input prompts interactively, generating text responses from the GPT-2 model.

License

Notifications You must be signed in to change notification settings

SynthWomb/Synthia-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity
Python HTML5 CSS3
TensorFlow Flask

Synthia-Unity




SynthiaGPT leverages Google's Gemini & the Hugging Face Transformers library to interact with a pre-trained GPT-2 model. It employs TensorFlow for model management and AutoTokenizer for efficient tokenization. The script enables users to input prompts interactively, generating text responses from the GPT-2 model. To improve the user experience, unnecessary warning messages related to the transformers library are effectively suppressed.

Scripts:

  • main.py: The selection menu for SynthiaGPT
  • app.py: Run SynthiaGPT as a web-server
  • redirect.py: Redirect to main.py

/scripts/

  • gemini.py: Run SynthiaGPT with Gemini
  • gemini_t2s.py: Run SynthiaGPT with Gemini and text-to-speech functionality
  • transformer.py: Run SynthiaGPT
  • transformer_t2s.py: Run SynthiaGPT with text-to-speech functionality
  • transformer_s2t2s.py: Run SynthiaGPT with speech-to-text-to-speech functionality
  • transformer_webcam.py: Run SynthiaGPT with webcam functionality
  • install_dependencies.py: Install dependencies

/scripts/system

  • generate_text.py: The GPT text generator
  • greeting.py: Greets the user
  • clean_text.py: Clean text from recorded voice audio
  • stt.py: Speech-to-text
  • tts.py: Text-to-speech
  • capture_photo.py: Capture photo with a webcam
  • play_audio.py: Play generated audio


Requirements:

transformers==4.37.1
tensorflow==2.14.0
torch==2.1.1
torchvision==0.16.1
torchaudio==2.1.1
flask==3.0.0
gtts==2.5.0
pyaudio==0.2.14 
pydub==0.25.1
beautifulsoup4==4.10.0
SpeechRecognition==3.10.1
pygame==2.5.2
google-generativeai==0.3.2

How to Run:

pip install -r requirements.txt
pip install torch torchvision torchaudio
python main.py
python app.py



About

SynthiaGPT leverages Google's Gemini & the Hugging Face Transformers library to interact with a pre-trained GPT-2 model. It employs TensorFlow for model management and AutoTokenizer for efficient tokenization. The script enables users to input prompts interactively, generating text responses from the GPT-2 model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published