-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.py
60 lines (43 loc) · 1.56 KB
/
gui.py
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
56
57
58
from customtkinter import *
import customtkinter
from PIL import Image
import os
## Initializations
app = CTk()
app.geometry("800x400")
set_appearance_mode("dark")
def click_handler():
print("Explaining this...")
## Prompt Buttons
x_pos = 0.2
expln_btn = CTkButton(master=app, text="Explain this", command=click_handler)
expln_btn.place(relx=x_pos, rely=0.1, anchor="center")
file_btn = CTkButton(master=app, text="File this", command=click_handler)
file_btn.place(relx=x_pos+0.2, rely=0.1, anchor="center")
response_btn = CTkButton(master=app, text="respond to this", command=click_handler)
response_btn.place(relx=x_pos+0.40, rely=0.1, anchor="center")
generate_btn = CTkButton(master=app, text="generate code", command=click_handler)
generate_btn.place(relx=x_pos+0.60, rely=0.1, anchor="center")
# Laying down image with relative coordinates
""" image_path = os.path.join(os.path.dirname(__file__), 'docs.png')
pil_image = Image.open(image_path)
ctk_image = CTkImage(pil_image)
image_label = CTkLabel(app, image=ctk_image, text="")
image_label.place(relx=0.4, rely=0.5, anchor="center") """
# Modality Buttons
x_pos = 0.3
sc_btn = CTkButton(
master=app,
width = 60,
height = 100,
text="Using Screenshot",
command=click_handler,
fg_color = "#E6E6E6",
text_color = "#39393A"
)
sc_btn.place(
relx=x_pos,
rely=0.75,
anchor="center"
)
app.mainloop()