Skip to content

Commit 70c11b0

Browse files
committed
better README.md and organization
1 parent 7ff5c8c commit 70c11b0

File tree

7 files changed

+44
-44
lines changed

7 files changed

+44
-44
lines changed

expression-measurement/streaming/python-example/README.md

-44
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<div align="center">
2+
<img src="https://storage.googleapis.com/hume-public-logos/hume/hume-banner.png">
3+
<h1>Expression Measurement | Sample Python Implementation</h1>
4+
<p>
5+
<strong>Analyze language using Hume's Python SDK.</strong>
6+
</p>
7+
</div>
8+
9+
## Overview
10+
This is a sample implementation of Hume's Expression Measurement using the Websocket interface in Hume's Python SDK. This example using the "language" model only, which is for analyzing the emotional content of of text.
11+
12+
See the [python-top-emotions batch example](../../batch/python-top-emotions) for how to process pre-recorded media files (images) using the *Batch* API, and see the [next-js-streaming-example](../next-js-streaming-example) for an example of how to use the Streaming API on the web to process live data coming from a webcam or microphone.
13+
14+
## Setup
15+
16+
1. Copy the `.env.example` file to `.env` and add your Hume API key:
17+
```
18+
cp .env.example .env
19+
```
20+
21+
2. Edit `.env` and replace `your_api_key_here` with your actual Hume API key
22+
23+
3. Create a virtual environment and install dependencies using `uv`:
24+
```
25+
uv venv
26+
uv pip install -e .
27+
```
28+
29+
## Usage
30+
31+
Run the example with `uv`:
32+
```
33+
uv run main.py
34+
```
35+
36+
Or using standard Python:
37+
```
38+
python main.py
39+
```
40+
41+
Type text and press Enter to analyze the emotions in the text. The example will display the emotion scores sorted from highest to lowest.
42+
43+
Type `exit` or press Ctrl+C to exit the application.
44+

0 commit comments

Comments
 (0)