jeffeux commited on
Commit
d63c268
·
1 Parent(s): c9d3334
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -25,7 +25,9 @@ device = ("cuda"
25
  logging.info(C("[INFO] "f"device = {device}"))
26
 
27
  # ------------------ INITITALIZE ------------------- #
28
- @st.cache
 
 
29
  def model_init():
30
 
31
 
@@ -68,8 +70,10 @@ try:
68
  [texts_out] = model.generate(
69
  **tokenizer(
70
  prompt, return_tensors="pt",
71
- max_new_tokens=200,
72
- ).to(device))
 
 
73
  output_text = tokenizer.decode(texts_out)
74
  st.balloons()
75
  st.markdown(output_text)
 
25
  logging.info(C("[INFO] "f"device = {device}"))
26
 
27
  # ------------------ INITITALIZE ------------------- #
28
+ @st.cache(
29
+ suppress_st_warning=True
30
+ )
31
  def model_init():
32
 
33
 
 
70
  [texts_out] = model.generate(
71
  **tokenizer(
72
  prompt, return_tensors="pt",
73
+
74
+ ).to(device),
75
+ max_new_tokens=200,
76
+ )
77
  output_text = tokenizer.decode(texts_out)
78
  st.balloons()
79
  st.markdown(output_text)