Skip to content

Commit c56ecc1

Browse files
committed
gui resized
1 parent 51b6131 commit c56ecc1

17 files changed

+9
-6
lines changed
0 Bytes
Binary file not shown.

__pycache__/models.cpython-39.pyc

15 Bytes
Binary file not shown.

__pycache__/utils.cpython-39.pyc

0 Bytes
Binary file not shown.

app.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
print("[INFO] Connected to server")
1515
#client code ends#
1616

17+
width = 900
18+
height = 750
19+
pos = (0,-20)
1720

1821

1922

@@ -27,7 +30,7 @@ def login_callback(sender, app_data, user_data):
2730
print(dpg.get_value("password"))
2831
dpg.delete_item("original")
2932

30-
with dpg.window(label="Example Window", width=500, height=500, tag="original"):
33+
with dpg.window(label="Example Window", width=width, height=height, tag="original", pos=pos):
3134
dpg.add_text("you have logged in")
3235
with dpg.file_dialog(directory_selector=False, show=False, callback=choose_file_callback, id="file_dialog_id"):
3336
dpg.add_file_extension(".csv")
@@ -74,7 +77,7 @@ def choose_file_callback(sender, app_data):
7477
print("[INFO] File Transfer Complete.Total time: ", end_time - start_time)
7578
#============client code ends==========#
7679
dpg.delete_item("original")
77-
with dpg.window(label="Example Window", width=500, height=500, tag="original"):
80+
with dpg.window(label="Example Window", width=width, height=height, tag="original", pos=pos):
7881
dpg.add_text("Your file has been selected and sent to server.")
7982
dpg.add_text("Enter the desired degree of your regression model. Eg-3")
8083
dpg.add_input_text(label="Regression Degree", tag="model_degree")
@@ -95,7 +98,7 @@ def send_model_data():
9598

9699

97100
dpg.delete_item("original")
98-
with dpg.window(label="Example Window", width=500, height=500, tag="original"):
101+
with dpg.window(label="Example Window", width=width, height=height, tag="original", pos=pos):
99102
dpg.add_text("Data sent to server")
100103
dpg.add_text("Model is getting trained by the model.....")
101104

@@ -121,14 +124,14 @@ def get_model_inputs():
121124

122125

123126
dpg.create_context()
124-
dpg.create_viewport(title="Machine Learning on Server", width=500, height=500)
127+
dpg.create_viewport(title="Machine Learning on Server", width=width, height=height, x_pos=0, y_pos=-20)
125128
dpg.setup_dearpygui()
126129

127130

128131

129132

130133

131-
with dpg.window(label="Example Window", width=500, height=500, tag="original"):
134+
with dpg.window(label="Example Window", width=width, height=height, tag="original", pos=pos):
132135
dpg.add_text("Enter your login credentials")
133136
dpg.add_input_text(label="User Name", tag="username")
134137
dpg.add_input_text(label="Password", tag="password")

models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,6 @@ def reg_training_model(df, user_dir, degree = 1, split_ratio = 0.2):
135135
sm.qqplot(residual_test, line='45', ax = ax2)
136136
ax2.set_title("Test")
137137
ax2.set_ylabel("Standard Residual")
138-
plt.savefig(f"{user_dir}/residual_pred.png")
138+
plt.savefig(f"{user_dir}/normalqq.png")
139139
return 0
140140

server_data/accuracy_pred.png

-32.5 KB
Binary file not shown.

server_data/actual_pred.png

-19.9 KB
Binary file not shown.

server_data/compare_error.png

-6.79 KB
Binary file not shown.

server_data/fitting.png

-16 KB
Binary file not shown.

server_data/jen/actual_pred.png

1.84 KB
Loading

server_data/jen/compare_error.png

348 Bytes
Loading

server_data/jen/fitting.png

828 Bytes
Loading

server_data/jen/normalqq.png

48.8 KB
Loading
Binary file not shown.

server_data/jen/residual_pred.png

-22.1 KB
Loading

server_data/normalqq.png

-19.9 KB
Binary file not shown.

server_data/residual_pred.png

-19.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)