BigSalmon commited on
Commit
c39e4f8
·
1 Parent(s): a9cf166

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,9 +1,15 @@
1
  import streamlit as st
2
- from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModel
 
 
3
  import torch
 
 
 
4
 
5
- first = """informal english: corn fields are all across illinois, visible once you leave chicago.\nTranslated into the Style of Abraham Lincoln: corn fields ( permeate illinois / span the state of illinois / ( occupy / persist in ) all corners of illinois / line the horizon of illinois / envelop the landscape of illinois ), manifesting themselves visibly as one ventures beyond chicago.\n\ninformal english: """
6
 
 
 
7
  @st.cache(allow_output_mutation=True)
8
  def get_model():
9
 
 
1
  import streamlit as st
2
+ import numpy as np
3
+ import pandas as pd
4
+ import os
5
  import torch
6
+ import torch.nn as nn
7
+ from transformers.activations import get_activation
8
+ from transformers import AutoTokenizer, AutoModelForCausalLM
9
 
 
10
 
11
+ first = """informal english: corn fields are all across illinois, visible once you leave chicago.\nTranslated into the Style of Abraham Lincoln: corn fields ( permeate illinois / span the state of illinois / ( occupy / persist in ) all corners of illinois / line the horizon of illinois / envelop the landscape of illinois ), manifesting themselves visibly as one ventures beyond chicago.\n\ninformal english: """
12
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  @st.cache(allow_output_mutation=True)
14
  def get_model():
15