felixz commited on
Commit
f0a9849
·
1 Parent(s): 627adc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
  from transformers import T5Tokenizer, T5ForConditionalGeneration
3
 
4
- tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-xl")
5
- model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xl")
 
6
 
7
  title = ""
8
 
@@ -31,6 +32,7 @@ with gr.Blocks() as demo:
31
  gr.Markdown(
32
  """
33
  # Flan T5 Large Demo
 
34
  Prompt the model in the Input box.
35
  """)
36
  txt_in = gr.Textbox(label="Input", lines=3)
 
1
  import gradio as gr
2
  from transformers import T5Tokenizer, T5ForConditionalGeneration
3
 
4
+ # xl size run out of memory on 16GB vm
5
+ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
6
+ model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large")
7
 
8
  title = ""
9
 
 
32
  gr.Markdown(
33
  """
34
  # Flan T5 Large Demo
35
+ 780M parameter Large language model fine tuned on diverse tasks.
36
  Prompt the model in the Input box.
37
  """)
38
  txt_in = gr.Textbox(label="Input", lines=3)