Skip to main content

It is just doing some stuff intelligently.

Project description

🦈 Shirley

shirley build license python pypi

It is just doing some stuff intelligently. It has the following features:

Installation

pip install shirley

Or, copy shirley directory to your working directory.

[Chat] Setup Qwen-VL-Chat model (local)

Add Qwen/Qwen-VL-Chat as a git submodule:

git submodule add https://huggingface.co/Qwen/Qwen-VL-Chat.git models/qwen_vl_chat
git submodule update --init --recursive models/qwen_vl_chat
git submodule update --remote --merge models/qwen_vl_chat

This downloads the model repository from Hugging Face and saves it in models/qwen_vl_chat.

Note: You can skip this if you want to use remote model.

[Text-To-Speech] Setup Azure AI Speech

Create AI Speech service in Azure portal.

Set environment variables:

export SPEECH_KEY=your-key
export SPEECH_REGION=your-region

Set environment variables on Windows:

setx SPEECH_KEY your-key
setx SPEECH_REGION your-region

Quicktour

# webui.py

import gradio as gr
import shirley as sh

with gr.Blocks() as blocks:
    sh.interfaces.Header()
    with gr.Tab('Chat'):
        sh.interfaces.Chat()
    with gr.Tab('Text-To-Speech'):
        sh.interfaces.TextToSpeech()
    sh.interfaces.Footer()

blocks.queue().launch()

Chat interface uses local model by default. If you want to use remote one, add options:

...
sh.interfaces.Chat(
    options=ChatInterfaceOptions(
        client=ChatClientOptions(local=False),
    ),
)
...

Note: I made an example webui.py. You can use that to start with.

Running

pip install -r requirements.txt
python webui.py

Note: I recommend using poetry to manage dependencies and run Python. See DEVELOPMENT.md for more details.

Development

See DEVELOPMENT.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shirley-0.1.19.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

shirley-0.1.19-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page