I am making an app using the yelp fusion API. I made a front-end with a form and
ID: 3864242 • Letter: I
Question
I am making an app using the yelp fusion API. I made a front-end with a form and when I submit it, I want to display the results. I dont know how to use form results in my python script that uses python version of the yelp API. I found a way to print the form results in flask, however.
Here is the form in my html file:
Here I am printing the results from the form in flask.
I want to use the results from the form in this method, which returns a list of the businesses that I want to print.
17 18 21 23 26 27 30 31 32 33 36 37 41 mainfl.py yelp-api-capital-summit py main.htmlExplanation / Answer
RUNRECORD_HEADER="date,recall,precision,f1,remarks" clean: # Clear out most files, so that a fresh run will re-index & re-query python -m fusionpy.tool delete rm -f indexed configured ... configured: solutiondupes.json solr-config/* # Configure if it's empty, succeed if it's matching, fail if it's mismatching python -m fusionpy.tool configure solutiondupes.json touch $@ indexed: index_my_stuff stuff.json configured # Index all the duplicates ./index_my_stuff touch $@ queries runrecord.csv querystats.json: test_queries indexed # Query, measure recall & precision, save out some stats to querystats.json $(if $(wildcard runrecord.csv),,echo $(RUNRECORD_HEADER) >runrecord.csv) echo -n `date --utc +%Y-%m-%d %T,` >>runrecord.csv ./test_queries >>runrecord.csv stats: calcstats querystats.json # Deep look at data ./calcstats # These targets are for saving configuration print-fusion-config: # Write this file into fusion-config-to-save.json and it will feed into the export-fusion-config target python -m fusionpy.tool dir mythings-config.json: fusion-config-to-save.json python -m fusionpy.tool export fusion-config-to-save.json >mythings-config.json
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.