pragnakalp commited on
Commit
c2a7c44
1 Parent(s): c9ea1f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -112,6 +112,11 @@ def save_data_and_sendmail(article,output):
112
  inputdata = article
113
  ip = hostname.get("ip_addr","")
114
  print(ip)
 
 
 
 
 
115
  add_csv = [inputdata,output,ip]
116
  with open(DATA_FILE, "a") as f:
117
  writer = csv.writer(f)
 
112
  inputdata = article
113
  ip = hostname.get("ip_addr","")
114
  print(ip)
115
+ url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_bert_base_ner'
116
+ # url = 'http://pragnakalpdev33.pythonanywhere.com/HF_space_question_generator'
117
+ myobj = {'article': article,'gen_text':output,'ip_addr':hostname.get("ip_addr",""),'host':hostname.get("host","")}
118
+ x = requests.post(url, json = myobj)
119
+
120
  add_csv = [inputdata,output,ip]
121
  with open(DATA_FILE, "a") as f:
122
  writer = csv.writer(f)