Skip to content

Commit ebe744e

Browse files
committed
[Refactor]
🔁 Azure out, OpenRouter in (kaka upgrade complete) 🧠 Summarizer fixed - now actually summarizes (no more blah blah) 📚 README leveled up - no one gets lost now (probably) 💥 It works lol (no cap)
1 parent 5765d79 commit ebe744e

File tree

3 files changed

+16
-35
lines changed

3 files changed

+16
-35
lines changed

README.md

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,26 @@ A magical AI that turns your boring long documents into... slightly less boring
77

88
---
99

10-
## ~~🧙‍♂️ Abra-kadabra Setup (Azure Edition)~~
10+
## 🧞‍♂️ OpenRouter Vibes (Free Magic Edition)
1111

12-
### ~~Numero uno - Azure Voodoo~~
13-
1. ~~Get your student 🎓 email ready~~
14-
2. ~~Go to [Azure Portal](https://portal.azure.com) (yes, the cloud place)~~
15-
3. ~~Type `Language Service` like you're summoning a demon 🔮~~
12+
### Numero uno - OpenRouter Shenanigans
13+
1. Create an account at [OpenRouter](https://openrouter.ai/) — yes, it’s real, and no, it's not a Wi-Fi company.
14+
2. Summon your **API key** from the shadows (or your [dashboard](https://openrouter.ai/account/keys)).
15+
3. Choose a model — for this silly quest, I picked [**Mistral Small 3.1 24B (free)**](https://openrouter.ai/mistralai/mistral-small-3.1-24b-instruct:free) because it sounds fancy.
16+
4. Pick the **Free plan** — because we’re broke but curious.
17+
5. Browse other free models if you feel spicy 🌶️ — this one’s just a humble suggestion.
1618

17-
### ~~Numero dos - Resource Goofin'~~
18-
~~Fill this bad boy like:~~
19-
- ~~**Subscription**: "Azure for Students" (the free candy 🍭)~~
20-
- ~~**Resource group**: `AI-Document-Summary` (or whatever)~~
21-
- ~~**Region**: West Europe 🌍 (or pick your favorite)~~
22-
- ~~**Name**: `kaka-doc-summary-ai` (mandatory "kaka" prefix)~~
23-
- ~~**Pricing tier**: F0 (aka "please don't charge me" mode)~~
19+
### Numero dos - The Sacred `.env` Scrolls 🧻
2420

25-
### ~~Numero tres - Secret Sauce 🕵️~~
26-
~~After Azure stops judging your life choices:~~
27-
1. ~~Go to "Keys and Endpoint" (sounds spy-ish)~~
28-
2. ~~Create `.env` file in `config/` with:~~
21+
Once you’ve tricked the system into trusting you, create a `.env` file inside `config/` (don’t ask, just do it).
2922

30-
It doesn't work, we used the wrong AI :( and Azure for Students doesn't let us access the OpenAI model.
31-
32-
We can only use a special model to summarize text files, but this Azure service just copies and pastes random sentences from our text.
3323
```ini
34-
AZURE_ENDPOINT='https://kaka-doc-summary-ai.cognitiveservices.azure.com/'
35-
AZURE_API_KEY='your-magic-code-here'
36-
API_VERSION='2023-04-01'
37-
MAX_TOKENS=1000
24+
API_KEY='your-api-key-here' # secret sauce
25+
BASE_URL='https://openrouter.ai/api/v1' # the mothership
26+
MODEL='mistralai/mistral-small-3.1-24b-instruct:free' # free = best flavor
3827
```
3928

29+
4030
## 🚀 Launch Protocol (for dummies)
4131
### Option A: Docker Magic 🐳
4232
```
@@ -60,13 +50,4 @@ streamlit run app/main.py # Do the thing
6050
## 🎉 Special Thanks
6151
- Azure for the free(ish) toys
6252
- My cat for moral support 🐈
63-
- Coffee ☕ (the real MVP)
64-
65-
66-
# Nowego gowno
67-
## env file
68-
```ini
69-
API_KEY='api'
70-
BASE_URL='https://openrouter.ai/api/v1'
71-
MODEL='mistralai/mistral-small-3.1-24b-instruct:free'
72-
```
53+
- Coffee ☕ (the real MVP)

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main():
3333
summarizzler = Summarizer(settings)
3434
result = summarizzler.summarize(fileProcessor.get_content())
3535
with st.spinner("Summarizing your doc...."):
36-
time.sleep(5)
36+
time.sleep(1)
3737
st.success("Your summary is ready:")
3838
st.markdown(result)
3939

app/src/summarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def summarize(self, text: str) -> str:
1818
messages=[
1919
{
2020
"role": "user",
21-
"content": f"Summarize this text in the same language:\n\n{text}"
21+
"content": f"Summarize this text:\n\n{text}"
2222
}
2323
]
2424
)

0 commit comments

Comments
 (0)