Commit
·
651b271
1
Parent(s):
f1a99c7
Update app.py
Browse files
app.py
CHANGED
@@ -98,13 +98,14 @@ def save_data_and_sendmail(article,generated_questions,num_que,result):
|
|
98 |
writer.writerow(add_csv)
|
99 |
commit_url = repo.push_to_hub()
|
100 |
print("commit data :",commit_url)
|
101 |
-
except Exception as e:
|
102 |
-
|
103 |
|
104 |
-
try:
|
105 |
hostname = get_device_ip_address()
|
106 |
url = 'http://pragnakalpdev35.pythonanywhere.com/HF_space_que_gen'
|
107 |
myobj = {'article': article,'gen_que':result,'ip_addr':hostname.get("ip_addr",""),'host':hostname.get("host","")}
|
|
|
108 |
x = requests.post(url, json = myobj)
|
109 |
print(x)
|
110 |
# with open(DATA_FILE, "r") as file:
|
|
|
98 |
writer.writerow(add_csv)
|
99 |
commit_url = repo.push_to_hub()
|
100 |
print("commit data :",commit_url)
|
101 |
+
# except Exception as e:
|
102 |
+
# return "Error while storing data -->" + e
|
103 |
|
104 |
+
# try:
|
105 |
hostname = get_device_ip_address()
|
106 |
url = 'http://pragnakalpdev35.pythonanywhere.com/HF_space_que_gen'
|
107 |
myobj = {'article': article,'gen_que':result,'ip_addr':hostname.get("ip_addr",""),'host':hostname.get("host","")}
|
108 |
+
print("myobj ",myobj)
|
109 |
x = requests.post(url, json = myobj)
|
110 |
print(x)
|
111 |
# with open(DATA_FILE, "r") as file:
|