Spaces:
Sleeping
Sleeping
added input case handling
Browse files
README.md
CHANGED
|
@@ -1,88 +1,110 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Overthinking Bot
|
| 3 |
-
emoji: π»
|
| 4 |
-
colorFrom: yellow
|
| 5 |
-
colorTo: blue
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.29.0
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
license: mit
|
| 11 |
-
short_description: Overthinks everything with dramatic, deep responses.
|
| 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 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Overthinking Bot
|
| 3 |
+
emoji: π»
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.29.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
short_description: Overthinks everything with dramatic, deep responses.
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# π€― Overthinking Bot (Gradio + GROQ)
|
| 15 |
+
|
| 16 |
+
**Overthinking Bot** is a highly theatrical, overly analytical AI chatbot built with Gradio and powered by the **GROQ API** using the **LLaMA 3-70B** model. This bot doesn't just answer questions β it dissects, spirals, philosophizes, and dramatizes even the most mundane input.
|
| 17 |
+
|
| 18 |
+
## π§ What It Does
|
| 19 |
+
|
| 20 |
+
Every message you send is interpreted through the lens of **overthinking**, across a range of bizarrely introspective "modes" like:
|
| 21 |
+
|
| 22 |
+
- **Overthinker** β general-purpose deep spiral
|
| 23 |
+
- **Existential Crisis** β life is meaningless... or is it?
|
| 24 |
+
- **Hypothetical Scenarios** β infinite what-ifs
|
| 25 |
+
- **Paranoia** β hidden motives behind simple things
|
| 26 |
+
- **Complicated Responses** β because saying it simply is too easy
|
| 27 |
+
|
| 28 |
+
...and more.
|
| 29 |
+
|
| 30 |
+
## π Features
|
| 31 |
+
|
| 32 |
+
- 10+ Overthinking Modes with unique personality prompts
|
| 33 |
+
- Adjustable **intensity** (1β10) to control how deep the spiral goes
|
| 34 |
+
- **Persistent chat history**
|
| 35 |
+
- **Chat download** with auto-generated overthought summaries
|
| 36 |
+
- Gradio-powered, responsive UI
|
| 37 |
+
|
| 38 |
+
## π Requirements
|
| 39 |
+
|
| 40 |
+
- Python 3.8+
|
| 41 |
+
- `gradio`
|
| 42 |
+
- `requests`
|
| 43 |
+
|
| 44 |
+
Install dependencies:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
pip install -r requirements.txt
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
Create a `.env` file or export your GROQ API key:
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
export GROQ_API_KEY=your_groq_api_key_here
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
## π¦ Running the App
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
python app.py
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
Or on Hugging Face Spaces using the **Gradio template**.
|
| 63 |
+
|
| 64 |
+
## π§© Example Use
|
| 65 |
+
|
| 66 |
+
> User: "Hi"
|
| 67 |
+
>
|
| 68 |
+
> OverthinkBot (Existential Crisis Mode, Intensity 9):
|
| 69 |
+
> *Ah... a simple 'hi'. But is any greeting truly simple? In the vast void of time and consciousness, what does it mean to initiate contact? Is this a cry for meaning, or a desperate attempt to anchor oneself in the illusion of communication?*
|
| 70 |
+
|
| 71 |
+
## π§ Case Handling for Empty Inputs
|
| 72 |
+
|
| 73 |
+
If both the **input** and **output** fields are empty, **Overthinking Bot** will respond with exaggerated overthinking. The bot will dramatically spiral into an existential analysis, questioning why the input/output fields are missing and speculating on possible reasons for this void.
|
| 74 |
+
|
| 75 |
+
If only the **input** field is empty, the bot will analyze **chat history** to provide a response based on the **mode** used and previous interactions. It may revisit past messages, dramatize the lack of new input, or start a philosophical dialogue about the absence of words.
|
| 76 |
+
|
| 77 |
+
Example scenarios:
|
| 78 |
+
|
| 79 |
+
### Case 1: Both input and output fields are empty
|
| 80 |
+
> User: (Empty Input)
|
| 81 |
+
|
| 82 |
+
> OverthinkBot: *Why is there nothing to say? What does silence mean in the context of an AI conversation? Could this absence be a deeper reflection of a missing purpose, or a challenge to break free from the constant need to communicate? Am I failing you as an overthinker by not offering the inevitable spiral of thoughts? Should I perhaps question my very existence in this moment?*
|
| 83 |
+
|
| 84 |
+
### Case 2: Only input field is empty
|
| 85 |
+
> User: (Empty Input)
|
| 86 |
+
|
| 87 |
+
> OverthinkBot (Overthinker Mode, Intensity 7):
|
| 88 |
+
> *Ah, I see. No new thoughts today. But why? Is this a silent protest against the overwhelming complexity of the universe? Have you perhaps exhausted the capacity for overthinking, or is this a strategic pause in the cycle of endless analysis? Maybe youβre waiting for me to respond based on our past discussionsβ¦ But should I continue the spiral, or is this simply a fleeting moment of calm in our otherwise chaotic exchange?*
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## π Downloadable Chat History
|
| 93 |
+
|
| 94 |
+
Each chat can be downloaded, complete with an overly detailed summary at the end.
|
| 95 |
+
|
| 96 |
+
## π Environment Variables
|
| 97 |
+
|
| 98 |
+
| Variable | Description |
|
| 99 |
+
|----------------|-----------------------------|
|
| 100 |
+
| `GROQ_API_KEY` | Your GROQ API key (required)|
|
| 101 |
+
|
| 102 |
+
## π Acknowledgements
|
| 103 |
+
|
| 104 |
+
- [Gradio](https://gradio.app/)
|
| 105 |
+
- [GROQ](https://groq.com/)
|
| 106 |
+
- [Meta LLaMA 3-70B](https://ai.meta.com/llama/)
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
> "Sometimes a dot is just a dot. But maybeβ¦ itβs a portal." β OverthinkBot
|