Skip to content

Commit f501e91

Browse files
working showable project
2 parents 43c778e + 65771cf commit f501e91

12 files changed

+11
-5
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")
@@ -97,7 +100,7 @@ def send_model_data():
97100

98101

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

@@ -149,14 +152,14 @@ def get_model_inputs():
149152

150153

151154
dpg.create_context()
152-
dpg.create_viewport(title="Machine Learning on Server", width=500, height=500)
155+
dpg.create_viewport(title="Machine Learning on Server", width=width, height=height, x_pos=0, y_pos=-20)
153156
dpg.setup_dearpygui()
154157

155158

156159

157160

158161

159-
with dpg.window(label="Example Window", width=500, height=500, tag="original"):
162+
with dpg.window(label="Example Window", width=width, height=height, tag="original", pos=pos):
160163
dpg.add_text("Enter your login credentials")
161164
dpg.add_input_text(label="User Name", tag="username")
162165
dpg.add_input_text(label="Password", tag="password")

models.py

+3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ def reg_training_model(df, user_dir, degree = 1, split_ratio = 0.2):
6868
plt.legend(loc='upper left')
6969
plt.title("Polynomial Fitting")
7070
plt.savefig(f"{user_dir}/fitting.png")
71+
<<<<<<< HEAD
7172
# plt.show()
73+
=======
74+
>>>>>>> 65771cfe70696bdfb5aef65df8cf3f8aa223ab0b
7275

7376

7477
##-------------------------------------------------

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/normalqq.png

-19.9 KB
Binary file not shown.

server_data/report.pdf

-2.21 MB
Binary file not shown.

server_data/residual_pred.png

-19.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)