File size: 1,496 Bytes
2705160
7acb2e7
62ad9da
 
 
2705160
 
 
 
d123508
 
 
2705160
 
7acb2e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5675d05
7acb2e7
 
 
5675d05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Template Final Assignment - frenchtoast.dev
emoji: 🕵🏻‍♂️
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
hf_oauth: true
# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
hf_oauth_expiration_minutes: 480
---

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

# HF agent course final assigment

## local running
 
 Create a venv
 Install requirements
 create a .env file (see env.example)
 start with `python app.py`

DuckDuckGo and GoogleSearch have too many rate limit,
This code assume that a local running instance of searxng is on http://localhost:8888

On windows run it with:
$PORT=8888
docker run --rm `
 -p ${PORT}:8080 `
 -v "${PWD}/etcsearxng:/etc/searxng" `
 -e "BASE_URL=http://localhost:$PORT/" `
 -e "INSTANCE_NAME=my-instance" `
 -d searxng/searxng

 be sure to allow the json format in /etc/seraxng/settings.yml


For the same reason, for my tool for text to speech I locally run a speech to text docker image running whisper.cpp
whith ffmpeg installed for mp3 > wav conversion

And if I really have no longer any available token on openai or gemini, I can run a VLLM instance.

## Instrumentation

Instrumentation is enabled, 
an done locally with (Arize-ai phoenix)[https://github.com/Arize-ai/phoenix]
a server is launched with: 

python -m phoenix.server.main serve

and can be consulted on: http://127.0.0.1:6006