-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal-commands.txt
More file actions
67 lines (40 loc) · 2 KB
/
terminal-commands.txt
File metadata and controls
67 lines (40 loc) · 2 KB
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
# 1.1) Environment Replication (Recommended and Shorter)
# you can replicate the environment if you have conda like below
conda env create -f environment.yml
conda activate
# Playwright installation
playwright install
# for deactivation
conda deactivate
# OR
# 1.2) Environment Creation (New Env and For Non-Conda Users)
# you also have the options of new environment creation from raw python for non-conda users
python -m venv scriptenv
# below code is for powershell, same can be with different codeform for different consoles
.\scriptenv\Scripts\Activate.ps1
# if any permission error pops up
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
# Dependencies installation
pip install -r requirements.txt
# Playwright installation
playwright install
# for deactivation
deactivate
# 2) Google Gemini API Key(Powershell example below, we can set env var in terminal or git bash as well) [Required: In Both Approaches]
# From "https://aistudio.google.com/app/api-keys" you can fetch API for free as of OCT 2025
$env:GEMINI_API_KEY="your-api-key"
# 3.1) Run FastAPI backend (Standalone)
# We can access some features from our API directly
uvicorn src.api_server:app --reload
# Here are some endpoints
http://localhost:8000/write?url=link -> write method sample
http://localhost:8000/review?url=link -> review method sample
http://localhost:8000/ -> about the api
# OR
# 3.2) Run Streamlit UI (Standalone)
# It demonstrates the whole application and it runs api itself no need to run above fastapi code separately.
streamlit run src/streamlit_app.py
# OR
# 3.3) Run CLI orchestrator (Standalone)
# We can define URL, NAME, RL Search Query Environment Variable (in powershell, git-bash or terminal) or just python input method but it is lite version of streamlit version.
python src/main.py