gokilashree commited on
Commit
1e9c419
·
verified ·
1 Parent(s): ef644c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,4 +1,9 @@
1
- pip install transformers gradio
 
 
 
 
 
2
  from transformers import MBartForConditionalGeneration, MBart50Tokenizer
3
  import gradio as gr
4
 
 
1
+ import subprocess
2
+ import sys
3
+
4
+ # Install the necessary packages if not already installed
5
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "transformers", "gradio"])
6
+
7
  from transformers import MBartForConditionalGeneration, MBart50Tokenizer
8
  import gradio as gr
9