soarhigh commited on
Commit
c32fa80
·
1 Parent(s): 590fab8

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """Demo.ipynb
3
+
4
+ Automatically generated by Colaboratory.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1vy72Qs-scdzH68lhYbGN11fLzcE9Md1O
8
+ """
9
+
10
+ !pip install transformers gradio sentencepiece
11
+ !pip install transformers[sentencepiece]
12
+ !pip install sacremoses
13
+
14
+ import gradio as gr
15
+ import transformers
16
+ from transformers import pipeline
17
+
18
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-ko-en")
19
+
20
+ demo = gr.Interface.from_pipeline(pipe)
21
+ demo.launch()