fangedvampire24 commited on
Commit
b8ae191
·
verified ·
1 Parent(s): 36b0ed7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr #Web interface
2
- from transformers import AutoModelForCasalLM, AutoTokenizer #For loading the model and making the input into tokens
3
  model_name="Salesforce/codegen-350M-multi"
4
 
5
  #Initialize the tokenizer and model
6
  tokenizer=AutoTokenizer.from_pretrained(model_name)
7
- model=AutoModelForCasalLM.from_pretrained(model_name)
8
 
9
  def generate_code(prompt, max_length=100, temperature=0.7, top_p=0.95):
10
  inputs=tokenizer(prompt,return_tensors='pt')
 
1
  import gradio as gr #Web interface
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer #For loading the model and making the input into tokens
3
  model_name="Salesforce/codegen-350M-multi"
4
 
5
  #Initialize the tokenizer and model
6
  tokenizer=AutoTokenizer.from_pretrained(model_name)
7
+ model=AutoModelForCausalLM.from_pretrained(model_name)
8
 
9
  def generate_code(prompt, max_length=100, temperature=0.7, top_p=0.95):
10
  inputs=tokenizer(prompt,return_tensors='pt')