i have this script for summarizing text and want to take the input from html text fields to input it to the script and them show the results on the page.
i currently have
title = raw_input('Type a title for the text here:')
content = raw_input('Type the text to be summarized here:')
how can i change this to get the input from the html form?
Title:< input type = "text>
Content:< input type = "text>
I am not sure what do you mean when you say you want it as an offline webpage. You will need to use a server to handle that. This article here: http://docs.python.org/2/howto/webservers.html explains such a system. Once you are ready to put this on a server, you may take a look at http://learnpythonthehardway.org/book/ex51.html on how to handle web-forms with python.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.