Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uvicorn | |
from fastapi import FastAPI | |
from model import SentimentModel, SentimentQueryModel | |
app = FastAPI() | |
model = SentimentModel() | |
@app.post('/predict') | |
def predict(data: SentimentQueryModel): | |
data = data.dict() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask_restful import Resource, Api, reqparse | |
import pandas as pd | |
import ast | |
app = Flask(__name__) | |
api = Api(app) | |
class Users(Resource): | |
def get(self): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import pandas | |
import statsmodels.api as sm | |
def custom_heuristic(file_path): | |
''' | |
You are given a list of Titantic passengers and their associated | |
information. More information about the data can be seen at the link below: | |
http://www.kaggle.com/c/titanic-gettingStarted/data |