picocreator commited on
Commit
6373129
1 Parent(s): ead50fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ def precompute_state(text):
44
  state = None
45
  text_encoded = pipeline.encode(text)
46
  _, state = model.forward(text_encoded)
47
- yield state
48
 
49
  # Precomputing the base instruction set
50
  INSTRUCT_PREFIX = f'''
@@ -95,7 +95,7 @@ def translate(text, target_language, inState=PREFIX_STATE):
95
 
96
  state = None
97
  if inState != None:
98
- state = copy.deepcopy(inState)
99
 
100
  # Clear GC
101
  gc.collect()
 
44
  state = None
45
  text_encoded = pipeline.encode(text)
46
  _, state = model.forward(text_encoded)
47
+ yield dict(state)
48
 
49
  # Precomputing the base instruction set
50
  INSTRUCT_PREFIX = f'''
 
95
 
96
  state = None
97
  if inState != None:
98
+ state = dict(inState)
99
 
100
  # Clear GC
101
  gc.collect()