cbauer commited on
Commit
350a8ea
·
1 Parent(s): f70cddf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,7 +1,9 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- generator = pipeline('text-generation', model='cbauer/groupchatGPT', trust_remote_code=True, ignore_mismatched_sizes=True)
 
 
5
 
6
  def generate(text):
7
  result = generator(text, max_length=30, num_return_sequences=1)
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ model = AutoModelForCausalLM.from_pretrained('cbauer/groupchatGPT', trust_remote_code=True, ignore_mismatched_sizes=True)
5
+
6
+ generator = pipeline('text-generation', model=model, trust_remote_code=True)
7
 
8
  def generate(text):
9
  result = generator(text, max_length=30, num_return_sequences=1)