-
Notifications
You must be signed in to change notification settings - Fork 0
/
modusAGI.py
58 lines (44 loc) · 2.03 KB
/
modusAGI.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
import tkinter as tk
from tkinter import messagebox
class ModusAGI(tk.Tk):
def __init__(self):
super().__init__()
self.title("modusAGI: EZ executor easyAGI")
self.geometry("800x600")
self.create_widgets()
def create_widgets(self):
self.label = tk.Label(self, text="modusAGI", font=("Helvetica", 16))
self.label.pack(pady=10)
self.input_frame = tk.Frame(self)
self.input_frame.pack(pady=20)
self.input_label = tk.Label(self.input_frame, text="Enter Command:")
self.input_label.pack(side=tk.LEFT, padx=5)
self.command_entry = tk.Entry(self.input_frame, width=50)
self.command_entry.pack(side=tk.LEFT, padx=5)
self.submit_button = tk.Button(self.input_frame, text="Execute", command=self.execute_command)
self.submit_button.pack(side=tk.LEFT, padx=5)
self.output_text = tk.Text(self, height=20, width=100, state=tk.DISABLED)
self.output_text.pack(pady=20)
self.status_bar = tk.Label(self, text="Ready", relief=tk.SUNKEN, anchor=tk.W)
self.status_bar.pack(side=tk.BOTTOM, fill=tk.X)
def execute_command(self):
command = self.command_entry.get()
self.status_bar.config(text="Executing Command...")
self.output_text.config(state=tk.NORMAL)
self.output_text.insert(tk.END, f"Executing: {command}\n")
try:
result = self.process_command(command)
self.output_text.insert(tk.END, f"Result: {result}\n")
except Exception as e:
self.output_text.insert(tk.END, f"Error: {e}\n")
self.output_text.config(state=tk.DISABLED)
self.status_bar.config(text="Ready")
def process_command(self, command):
# Placeholder for integrating easyAGI functionalities
if command == "example":
return "This is a sample response from easyAGI integration."
else:
return "Command not recognized."
if __name__ == "__main__":
app = ModusAGI()
app.mainloop()