Skip to main content

🦈 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.

Release files for shirley 0.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shirley 0.1.19
File Size Uploaded
shirley-0.1.19.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shirley 0.1.19
File Interpreter ABI Platform
shirley-0.1.19-py3-none-any.whl Python 3 none any Details

Total release size: 29.0 kB

Release files / shirley-0.1.19.tar.gz

Download URL shirley-0.1.19.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
47fefb75c121cb97b91a77f32fc06a1a5c72bbc71fec9ecc20744bda7249f492
BLAKE2b-256 checksum
How to use checksums
f1fadbdbae6a2fbdcf022906369920766811171aaf25588fa785a4cd8a52c532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / shirley-0.1.19-py3-none-any.whl

Download URL shirley-0.1.19-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c6549901f684746b6fe8056930419e0692e0790efeb87863feb367a9c260997
BLAKE2b-256 checksum
How to use checksums
0baa2095769d701d1a87cc324bc16439bb7eef044c16dc9c4c7bcb6b0422f65e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.1.19 This release

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page