diff options
| author | Abdellah El Morabit <nsrddyn@gmail.com> | 2024-11-14 19:31:39 +0100 |
|---|---|---|
| committer | Abdellah El Morabit <nsrddyn@gmail.com> | 2024-11-14 19:31:39 +0100 |
| commit | ec2afe02ea46b20a4d3c931f58731e8a6fbd6b46 (patch) | |
| tree | 4f12355a857c0ecafb75932ded7cbf9def79eb35 | |
| parent | fe441f69a4632e5245588574923ef8dc467eced5 (diff) | |
removing ollama it was a bad idea
| -rw-r--r-- | bin/source.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/bin/source.py b/bin/source.py index c232351..f30c066 100644 --- a/bin/source.py +++ b/bin/source.py | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | import time | 1 | import time |
| 2 | import os | 2 | import os |
| 3 | import ollama | ||
| 4 | import speech_recognition as speech | 3 | import speech_recognition as speech |
| 5 | import i2c as LCD | 4 | import i2c as LCD |
| 6 | from gpiozero import CPUTemperature | 5 | from gpiozero import CPUTemperature |
| @@ -69,30 +68,9 @@ def save_notes(): | |||
| 69 | if OUTPUT == i: | 68 | if OUTPUT == i: |
| 70 | PRINT_REQUEST == False | 69 | PRINT_REQUEST == False |
| 71 | 70 | ||
| 72 | def lama(): | ||
| 73 | QUESTION_REQUEST = True | ||
| 74 | while QUESTION_REQUEST == True: | ||
| 75 | QUESTION_REQUEST = input | ||
| 76 | ("do you want to ask a question") == 'yes' | ||
| 77 | if QUESTION_REQUEST == True: | ||
| 78 | USER_QUESTION = input() | ||
| 79 | response = lama.chat( | ||
| 80 | model="llama3.2", | ||
| 81 | messages=[ | ||
| 82 | { | ||
| 83 | "role": "user", | ||
| 84 | "content": USER_QUESTION, | ||
| 85 | }, | ||
| 86 | ], | ||
| 87 | ) | ||
| 88 | print(response["messages"]["content"]) | ||
| 89 | else: | ||
| 90 | break | ||
| 91 | |||
| 92 | 71 | ||
| 93 | 72 | ||
| 94 | OPTIONS = { | 73 | OPTIONS = { |
| 95 | "LAMA": ollama(), | ||
| 96 | "CPU_INFO": display_cpu_info(), | 74 | "CPU_INFO": display_cpu_info(), |
| 97 | "UPTIME": display_uptime(), | 75 | "UPTIME": display_uptime(), |
| 98 | "SPEECH_TRANSCRIBER": recognize_speech(), | 76 | "SPEECH_TRANSCRIBER": recognize_speech(), |
