Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -17,16 +17,17 @@ app.add_middleware(
|
|
17 |
allow_headers=["*"],
|
18 |
)
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
# Define connection parameters
|
25 |
-
host = "68.183.225.237"
|
26 |
-
user = "sm_ml"
|
27 |
-
password = "Fz6/I733"
|
28 |
-
database = "sm_qa_1"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Establish connection
|
31 |
connection = mysql.connector.connect(
|
32 |
host=host,
|
@@ -59,14 +60,6 @@ def insert_data(b_id,forecast_data):#mysql-connector-python
|
|
59 |
|
60 |
|
61 |
def delete_json(b_id):
|
62 |
-
import mysql.connector
|
63 |
-
|
64 |
-
# Define connection parameters
|
65 |
-
host = "68.183.225.237"
|
66 |
-
user = "sm_ml"
|
67 |
-
password = "Fz6/I733"
|
68 |
-
database = "sm_qa_1"
|
69 |
-
|
70 |
# Establish connection
|
71 |
connection = mysql.connector.connect(
|
72 |
host=host,
|
@@ -92,15 +85,6 @@ def delete_json(b_id):
|
|
92 |
connection.close()
|
93 |
|
94 |
def get_data(b_id):
|
95 |
-
import mysql.connector
|
96 |
-
import json
|
97 |
-
|
98 |
-
# Define connection parameters
|
99 |
-
host = "68.183.225.237"
|
100 |
-
user = "sm_ml"
|
101 |
-
password = "Fz6/I733"
|
102 |
-
database = "sm_qa_1"
|
103 |
-
|
104 |
# Establish connection
|
105 |
connection = mysql.connector.connect(
|
106 |
host=host,
|
|
|
17 |
allow_headers=["*"],
|
18 |
)
|
19 |
|
20 |
+
|
21 |
+
import mysql.connector
|
22 |
+
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
# Define connection parameters
|
25 |
+
host = "68.183.225.237"
|
26 |
+
user = "sm_ml"
|
27 |
+
password = "Fz6/I733"
|
28 |
+
database = "sm_qa_1"
|
29 |
+
|
30 |
+
def insert_data(b_id,forecast_data):#mysql-connector-python
|
31 |
# Establish connection
|
32 |
connection = mysql.connector.connect(
|
33 |
host=host,
|
|
|
60 |
|
61 |
|
62 |
def delete_json(b_id):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
# Establish connection
|
64 |
connection = mysql.connector.connect(
|
65 |
host=host,
|
|
|
85 |
connection.close()
|
86 |
|
87 |
def get_data(b_id):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
# Establish connection
|
89 |
connection = mysql.connector.connect(
|
90 |
host=host,
|