joonkim commited on
Commit
36f19b3
β€’
1 Parent(s): fa892a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -1,15 +1,12 @@
1
  import gradio as gr
2
  import numpy as np
3
- import torch
4
- import torch.nn as nn
5
- import torch.nn.functional as F
6
 
7
- from model import SentimentClassifier
8
  from transformers import BertTokenizer
9
 
10
 
11
- PATH = 'bert-political-sentiment-analysis/checkpoints/'
12
  DEVICE = torch.device('cpu')
 
13
 
14
  model = torch.load(PATH + 'model.pt')
15
  model.load_state_dict(torch.load(PATH + 'model_state_dict.pt',
 
1
  import gradio as gr
2
  import numpy as np
 
 
 
3
 
4
+ from model import *
5
  from transformers import BertTokenizer
6
 
7
 
 
8
  DEVICE = torch.device('cpu')
9
+ PATH = 'checkpoints/'
10
 
11
  model = torch.load(PATH + 'model.pt')
12
  model.load_state_dict(torch.load(PATH + 'model_state_dict.pt',