Cegil commited on
Commit
9ec55d9
1 Parent(s): fc83e8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,9 +1,10 @@
1
  import streamlit as st
2
- from transformers import T5ForConditionalGeneration # Replace with the library used for your code generation model
3
 
4
  # Load your code generation model
5
  model_path = "Cegil/code_generation" # e.g., a model checkpoint or saved weights
6
- code_gen_model = T5ForConditionalGeneration.load_model(model_path) # Load your model
 
7
 
8
  # UI for Code Generation
9
  st.title("Code Generation Interface")
 
1
  import streamlit as st
2
+ from transformers import T5ForConditionalGeneration, T5Tokenizer # Replace with the library used for your code generation model
3
 
4
  # Load your code generation model
5
  model_path = "Cegil/code_generation" # e.g., a model checkpoint or saved weights
6
+ code_gen_model = T5ForConditionalGeneration.from_pretrained(model_path)
7
+ tokenizer = T5Tokenizer.from_pretrained(model_path)
8
 
9
  # UI for Code Generation
10
  st.title("Code Generation Interface")