-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflask_api_test.py
14 lines (11 loc) · 8.49 KB
/
flask_api_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import requests
url = 'http://192.168.52.226:5000/predict'
data = {
"article": "nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electors almost always vote with the popular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012nation's head of state, the president, is elected indirectly by the people of each state, through an Electoral College. Today, these electoropular vote of their state. All members of the federal legislature, the Congress, are directly elected by the people of each state. There are many elected offices at state level, each state having at least an elective governor and legislature. There are also elected offices at the local level, in counties, cities, towns, townships, boroughs, and villages; as well as for special districts and school districts which may transcend county and municipal boundaries. According to a study by political scientist Jennifer Lawless, there were 519,682 elected officials in the United States as of 2012"
}
# send post request
r = requests.post(url, json=data)
print('response status: ', r)
print('-----------------------')
print('The predicted topics for that article are: ', r.text)
print('-----------------------')