File size: 2,077 Bytes
1d90a80
dc37e9e
04a64a8
1d90a80
 
 
 
 
 
 
dc37e9e
0eb5f56
dc37e9e
0eb5f56
dc37e9e
0eb5f56
dc37e9e
 
 
 
0eb5f56
dc37e9e
0eb5f56
7e5b577
dc37e9e
 
 
0eb5f56
dc37e9e
0eb5f56
dc37e9e
0eb5f56
 
 
dc37e9e
0eb5f56
dc37e9e
0eb5f56
 
dc37e9e
0ef192c
0eb5f56
 
dc37e9e
0eb5f56
 
dc37e9e
0eb5f56
 
 
dc37e9e
0eb5f56
 
dc37e9e
0eb5f56
 
dc37e9e
0eb5f56
 
 
dc37e9e
7e5b577
dc37e9e
7e5b577
dc37e9e
 
 
0eb5f56
dc37e9e
0eb5f56
dc37e9e
 
 
 
 
0eb5f56
dc37e9e
0eb5f56
dc37e9e
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: minimal-helium-experiment
emoji: 💻
colorFrom: blue
colorTo: red
sdk: docker
app_file: app/server.py
pinned: false
---

# Minimal Browser Screenshot Experiment with Helium

This web application allows taking screenshots of websites using a headless browser and displaying them directly in the user interface.

## Features

- Simple and responsive web interface
- URL input with default value pointing to Open LLM Leaderboard
- Screenshot capture via Helium (Chrome browser)
- Display of results in the interface

## Technologies Used

- **Backend**: FastAPI, Helium
- **Frontend**: HTML/JS with Tailwind CSS
- **Dependency Management**: Poetry
- **Deployment**: Docker, Hugging Face Spaces

## Local Installation

### Prerequisites

- Python 3.10+
- Poetry
- Docker (optional)

### Installation with Poetry

```bash
# Clone the repository
git clone [repo-url]
cd minimal-browser-screenshot-experiment

# Install dependencies
poetry install

# Launch the application
poetry run uvicorn app.server:app --host 0.0.0.0 --port 7860
```

### Using Docker

```bash
# Build the Docker image
docker build -t minimal-browser-screenshot .

# Run the container
docker run -p 7860:7860 minimal-browser-screenshot
```

## Deployment on Hugging Face Spaces

This application is designed to be easily deployed on a Hugging Face Space.

1. Create a new Docker-type Space
2. Associate this GitHub repository with your Space
3. The Space will automatically use the provided Dockerfile to build and deploy the application

## Usage

1. Access the application through your browser
2. Enter the URL of the site you want to screenshot (default: Open LLM Leaderboard)
3. Click "Take a screenshot"
4. Wait a few seconds for the headless browser to load the page and take the screenshot
5. The screenshot appears in the interface

## About Helium

Helium is a Python library that simplifies browser automation. It's an abstraction layer on top of Selenium that offers a simpler and more intuitive API. Helium was chosen to replace Playwright in this project to demonstrate its ease of use.