This repository was archived by the owner on Sep 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
55 lines (49 loc) · 1.61 KB
/
Copy pathmain.py
File metadata and controls
55 lines (49 loc) · 1.61 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
from tasks import helloapi, moderation, blogger, liar, inprompt, embedding, whisper, functions, rodo, scraper, whoami
import os
tasks = {
'helloapi': helloapi.main,
'moderation': moderation.main,
'blogger': blogger.main,
'liar': liar.main,
'inprompt': inprompt.main,
'embedding': embedding.main,
'whisper': whisper.main,
'functions': functions.main,
'rodo': rodo.main,
'scraper': scraper.main,
'whoami': whoami.main,
}
def main():
try:
os.system('cls')
print('AI_DEVS 2')
print()
print('Dostępne zadania:')
for i, task_name in enumerate(tasks.keys(), start=1):
print(f'{i}. {task_name}')
print()
choice = input('Podaj numer lub nazwę zadania który chcesz wykonać: ')
os.system('cls')
if choice.isdigit():
number = int(choice)
if 1 <= number <= len(tasks):
selected_function = list(tasks.values())[number - 1]
selected_function()
else:
print('Nieprawidłowy numer zadania.')
print()
input('Naciśnij [enter], aby wrócić do menu wyboru.')
main()
else:
if choice in tasks:
selected_function = tasks [choice]
selected_function()
else:
print('Nieprawidłowy numer zadania.')
print()
input('Naciśnij [enter], aby wrócić do menu wyboru.')
main()
except Exception as e:
print(f"Error occurred: {e}")
if __name__ == "__main__":
main()