Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 3 |
|
| 4 |
# Ensure sentencepiece is installed
|
| 5 |
-
import subprocess
|
| 6 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'sentencepiece'])
|
| 7 |
|
| 8 |
# Load the tokenizer and model from the downloaded directory
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import subprocess
|
| 3 |
+
import sys
|
| 4 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 5 |
|
| 6 |
# Ensure sentencepiece is installed
|
|
|
|
| 7 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'sentencepiece'])
|
| 8 |
|
| 9 |
# Load the tokenizer and model from the downloaded directory
|