File size: 1,754 Bytes
f067045
6d09cf7
e268fbc
d06e1c2
f067045
 
 
 
 
 
6d09cf7
f067045
 
 
af50914
 
 
 
 
 
 
 
3b164c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: Brand Tune
emoji: πŸŽ·πŸ›
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 3.32.0
app_file: app.py
pinned: false
license: mit
python_version: "3.9"
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

## Running locally

Run the following from the terminal:

```sh
poetry install
poetry run gradio app.py
```

## Customization

Interested in using Brand Tune for your own brand?
Begin by duplicating this Hugging Face Space.
There should be a button with a vertical "..." in the top right.
If you expand it, there's a "Duplicate this Space" option – click it.

Select the name you want to use.
The hardware is not important, so pick the cheapest option.
The actual computation takes place via the OpenAI API,
so you will need to fill in the `OPENAI_API_KEY` space secret.
See [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key)
on how to get one.

This will give you a copy of the space that you can edit.

### Brand guidelines

Next, edit `meta_prompt.txt` to describe the style you're looking for.

You can also provide an example input/output pair - like "write an instagram post about X"
and then an example of what a good answer would look like.
This can help guide ChatGPT to follow the style you want.
First, go to `app.py` and set `USE_EXAMPLE = True`.
Then put the example input into `example_input.txt` and the corresponding output into `example_output.txt`.

### Changing the password

In the chatbot, type "/password [the password you want]".
This will give you instructions on how to change the password – you'll need to edit `brand_tune/app.py`.

If your Space is public, this will prevent unknown people from using your OpenAI API.