pablo-rf commited on
Commit
e98e994
1 Parent(s): f892462

global variable

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -61,9 +61,10 @@ model_id_cerebras = "proxectonos/Carballo-cerebras-1.3B"
61
 
62
  generator_model_gl = pipeline("text-generation", model=model_id_bloom)
63
  generator_model_pt = pipeline("text-generation", model=model_id_carvalho)
64
- print(generator_model_gl.model.name_or_path)
65
  # Generation functions ---------------------------------------------------------
66
  def get_model(model_selection):
 
67
  if model_selection == "Carballo-bloom-1.3B":
68
  if generator_model_gl.model.name_or_path != model_id_bloom:
69
  generator_model_gl = pipeline("text-generation", model=model_id_bloom)
 
61
 
62
  generator_model_gl = pipeline("text-generation", model=model_id_bloom)
63
  generator_model_pt = pipeline("text-generation", model=model_id_carvalho)
64
+
65
  # Generation functions ---------------------------------------------------------
66
  def get_model(model_selection):
67
+ global generator_model_gl
68
  if model_selection == "Carballo-bloom-1.3B":
69
  if generator_model_gl.model.name_or_path != model_id_bloom:
70
  generator_model_gl = pipeline("text-generation", model=model_id_bloom)