File size: 927 Bytes
9412efa
 
 
 
 
 
 
 
 
 
5a499dd
db28e1f
 
 
5a499dd
db28e1f
5a499dd
db28e1f
5a499dd
db28e1f
 
5a499dd
 
db28e1f
 
5a499dd
db28e1f
5a499dd
 
 
db28e1f
5a499dd
db28e1f
5a499dd
 
 
 
db28e1f
5a499dd
db28e1f
5a499dd
 
 
db28e1f
5a499dd
db28e1f
5a499dd
 
9412efa
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
---
title: AI Tutor
emoji: 💡
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: "4.44.1"
app_file: app.py
pinned: false
---
# Building and Deploying a Gradio UI on Hugging Face Spaces

## Overview

This repository contains the code of the "Building and Deploying a Gradio UI on Hugging Face Spaces" lesson of the "From Beginner to Advanced LLM Developer" course.

## Setup

1. Clone the repository.

```bash
git clone git@github.com:towardsai/ai-tutor-gradio-lesson.git
cd ai-tutor-gradio-lesson
```

2. Create a `.env` file and add there your OpenAI API key. Its content should be something like:

```bash
OPENAI_API_KEY="sk-..."
```

3. Create a local virtual environment, for example using the `venv` module. Then, activate it.

```bash
python -m venv venv
source venv/bin/activate
```

4. Install the dependencies.

```bash
pip install -r requirements.txt
```

5. Launch the Gradio app.

```bash
python app.py
```