Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avicennajr/pycon_arusha
Presented Code at Pycon Arusha
https://github.com/avicennajr/pycon_arusha
Last synced: about 4 hours ago
JSON representation
Presented Code at Pycon Arusha
- Host: GitHub
- URL: https://github.com/avicennajr/pycon_arusha
- Owner: AvicennaJr
- Created: 2024-03-02T10:53:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-06T08:02:03.000Z (8 months ago)
- Last Synced: 2024-05-17T00:26:06.321Z (6 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pycon Arusha
This is (some of) the source code of the tutorials presented at Pycon Arusha on 2nd March, 2024.
We built two main applications;
- A chatbot interface
- An AI powered text correction## Requirements
To run any of these programs then you need the following:
- Python
- Groq API key. You can get it from: https://console.groq.com
- Ollama for the `text-correction-ollama.py` example. You can download and install ollama here: https://ollama.ai## ChatBot Interface
There are mainly two versions, one with memory and one without. Both are presented to show the difference between the two.
The chatbot interface without memory is in the file `chatbot.py` and the one with memory is in the file `chatbot-with-memory.py`.
## AI Powered Text Correction
There are two versions of the AI powered Text correction, one uses (Groq)[https://groq.com] in the file `text-correction-groq.py` and the other uses a self hosting option with (ollama)[https://ollama.ai] in the file `text-correction-ollama.py`.
## Usage
### Install Requirements:
```bash
pip install -r requirements.txt
```### Fill in the Groq API Key:
For the following files:
- chatbot.py
- chatbot-with-memory.py
- text-correction-groq.pyReplace `your-api-key-here` with your actual API keys, otherwise you will receive an error.
### Run the application
Choose any of the files and run it with python. For example:
```bash
python chatbot.py
```### Notes
For the text correction example, I used the key `F9`. In `pynput` you have to specify the value of `F9` on your keyboard, which in my case is `<65478>`.
But in case that value is incorrect for you, the just open the python shell and run the following commands as shown in the screenshot below:
![Key Value](./assets/key_value.png)
Copy the value (with the brackets `<>`) and use them in the code.
> For any questions and suggestions reach out to me via telegram @JustMojo