Spaces:
Running
Running
pragnakalp
commited on
Commit
·
d37c9e6
1
Parent(s):
436884a
Update app.py
Browse files
app.py
CHANGED
@@ -107,8 +107,8 @@ def generate_emotion(article):
|
|
107 |
|
108 |
result = {'Input':sen_list_temp, 'Detected Emotion':results}
|
109 |
gc.collect()
|
110 |
-
print("sen_list
|
111 |
-
print("results_dict
|
112 |
save_data_and_sendmail(article,results_dict,sen_list, results)
|
113 |
return pd.DataFrame(result)
|
114 |
|
@@ -117,8 +117,8 @@ Save generated details
|
|
117 |
"""
|
118 |
def save_data_and_sendmail(article,results_dict,sen_list,results):
|
119 |
try:
|
120 |
-
print("sen_list ",sen_list)
|
121 |
-
print("results
|
122 |
hostname = {}
|
123 |
hostname = get_device_ip_address()
|
124 |
|
@@ -134,9 +134,9 @@ def save_data_and_sendmail(article,results_dict,sen_list,results):
|
|
134 |
# url = 'http://pragnakalpdev33.pythonanywhere.com/HF_space_question_generator'
|
135 |
|
136 |
myobj = {"sentences":sen_list,"gen_results":results,"ip_addr":hostname.get("ip_addr",""),"host":hostname.get("host","")}
|
137 |
-
print("
|
138 |
x = requests.post(url, json = myobj)
|
139 |
-
print("myobj2 ",myobj)
|
140 |
|
141 |
except Exception as e:
|
142 |
return "Error while sending mail" + str(e)
|
|
|
107 |
|
108 |
result = {'Input':sen_list_temp, 'Detected Emotion':results}
|
109 |
gc.collect()
|
110 |
+
print("sen_list@@@@@@@@@ ",sen_list)
|
111 |
+
print("results_dict@@@@@@@@ ",results_dict)
|
112 |
save_data_and_sendmail(article,results_dict,sen_list, results)
|
113 |
return pd.DataFrame(result)
|
114 |
|
|
|
117 |
"""
|
118 |
def save_data_and_sendmail(article,results_dict,sen_list,results):
|
119 |
try:
|
120 |
+
print("sen_list^^^^^ ",sen_list)
|
121 |
+
print("results^^^^^^ ",results)
|
122 |
hostname = {}
|
123 |
hostname = get_device_ip_address()
|
124 |
|
|
|
134 |
# url = 'http://pragnakalpdev33.pythonanywhere.com/HF_space_question_generator'
|
135 |
|
136 |
myobj = {"sentences":sen_list,"gen_results":results,"ip_addr":hostname.get("ip_addr",""),"host":hostname.get("host","")}
|
137 |
+
print("myobj###### ",myobj)
|
138 |
x = requests.post(url, json = myobj)
|
139 |
+
print("myobj2$$$$$ ",myobj)
|
140 |
|
141 |
except Exception as e:
|
142 |
return "Error while sending mail" + str(e)
|