Crystalcareai commited on
Commit
e35584d
·
verified ·
1 Parent(s): ac656b1

Update generate.py

Browse files
Files changed (1) hide show
  1. generate.py +8 -0
generate.py CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  def custom_generate(
2
  self,
3
  input_ids,
 
1
+ import torch
2
+ from transformers.generation.utils import (
3
+ GenerationMixin,
4
+ validate_stopping_criteria,
5
+ StoppingCriteriaList,
6
+ )
7
+ from transformers import TextStreamer
8
+
9
  def custom_generate(
10
  self,
11
  input_ids,