File size: 1,386 Bytes
5253983
 
 
 
 
 
 
 
 
 
 
b89ec8f
5253983
 
cf23c49
 
b89ec8f
cf23c49
b89ec8f
cf23c49
b89ec8f
 
 
cf23c49
 
 
 
 
 
 
 
b89ec8f
cf23c49
 
 
b89ec8f
cf23c49
 
 
 
 
 
 
 
b89ec8f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
57
58
59
60
61
62
63
---
title: Ebook Gen
emoji: 🐢
colorFrom: pink
colorTo: gray
sdk: streamlit
sdk_version: 1.29.0
app_file: app.py
pinned: false
license: mit
---
# Mixtral Playground

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


## Python Setup

Follow these steps to set up the environment:

1. Clone this repository.
2. Create and activate a new virtual environment using `conda` or `venv`. If you need guidance, refer to this [tutorial](https://www.perplexity.ai/search/how-to-make-GnFc09yGTvSyka0ZWqhSQg?s=c).
3. Create a `.env` file to store API credentials. You'll need these four credentials:

   ```
   HF_TOKEN = ...
   GOOGLE_SEARCH_ENGINE_ID = ...
   GOOGLE_SEARCH_API_KEY = ...
   BING_SEARCH_API_KEY = ...
   ``` 

4. Install the necessary requirements:
    ```
    pip install -r requirements.txt --user
    ```
5. Start the Streamlit server using either command:
    ```
    streamlit run app.py
    ```
    or 
    ```
    python -m streamlit run app.py
    ```


## Docker Setup

If you prefer using Docker, follow these steps:

1. Clone the repository.
2. Create a `.env` file to store API credentials, similar to the Python setup.

3. Build docker image using
    
    ```
    docker build -t mixtral-playground .
    ```
4. Run the image using
    
    ```
    docker run --env-file .env -p 8501:8501 mixtral-playground
    ```