Professional Documents
Culture Documents
py
from django.shortcuts import render
from tweepy import OAuth1UserHandler, API
from textblob import TextBlob
import pickle
def home(request):
# Render the home template
return render(request, "home.html")
def search(request):
# Get the search term from the user's input
search_term = request.GET["search_term"]
# Render the results template with the search term and predictions
return render(request, "results.html", {"search_term": search_term,
"predictions": predictions})