Skip to main content

No project description provided

Project description

Hugging Chat Python

Installation

As library

From Pypi

pip install hgchat

From Codeberg

pip install --index-url https://codeberg.org/api/packages/Bavarder/pypi/simple/ hgchat

As an interactive prompt

git clone https://codeberg.org/Bavarder/hgchat.git # or https://github.com/Bavarder/hgchat.git
cd hgchat

Usage

As library

from hgchat import HGChat
hgchat = HGChat()

r = hgchat.ask(user_input)
for i in r:
    char = i["token"]["text"]
    if char == "</s>":
        print("\n", end="")
    else:
        print(char, end="")

As an interactive prompt

python chat.py

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

hgchat-0.1.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

hgchat-0.1.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file hgchat-0.1.2.tar.gz.

File metadata

  • Download URL: hgchat-0.1.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/6.3.0

File hashes

Hashes for hgchat-0.1.2.tar.gz
Algorithm Hash digest
SHA256 633e53cb7c9e0013b27543a7c8362af93d8ca7f47f5ab5a0747fd116b5e43271
MD5 90b3819f7ba7a55ad0f321ed16102ada
BLAKE2b-256 2669c006e6e2d01dbd77c796997e534ed4c4b09a992c2ff07ea0c340ce775115

See more details on using hashes here.

File details

Details for the file hgchat-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: hgchat-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/6.3.0

File hashes

Hashes for hgchat-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0699dff7ab9ed208e6801c5e558f7c62422c630f5976062bf75e0580c20f83
MD5 67f17f157a5599016e722e989fb65f11
BLAKE2b-256 a2d28847383637ae526c6b072356bc1c7d9e7e34040b3acf27c0ec529885ac3d

See more details on using hashes here.

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