seawolf2357 commited on
Commit
f9346bd
1 Parent(s): c9333e9

initial commit

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -1,12 +1,9 @@
1
  import gradio as gr
2
- import torch
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
 
5
  tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ko-en")
6
  model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-ko-en")
7
 
8
- device = 0 if torch.cuda.is_available() else -1
9
-
10
  demo = gr.Interface(
11
  inputs=[
12
  gr.components.Textbox(label="Text"),
 
1
  import gradio as gr
 
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ko-en")
5
  model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-ko-en")
6
 
 
 
7
  demo = gr.Interface(
8
  inputs=[
9
  gr.components.Textbox(label="Text"),