acecalisto3 commited on
Commit
6f4d783
·
verified ·
1 Parent(s): 7028145

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import streamlit as st
2
  from streamlit_ace import st_ace
3
- from streamlit_jupyter import st_jupyter
4
  from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM
5
  import os
6
  import subprocess
@@ -12,6 +11,11 @@ import torch
12
  from huggingface_hub import hf_hub_url, cached_download, HfApi
13
  import re
14
  from typing import List, Dict
 
 
 
 
 
15
 
16
  # Access Hugging Face API key from secrets
17
  hf_token = st.secrets["hf_token"]
 
1
  import streamlit as st
2
  from streamlit_ace import st_ace
 
3
  from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM
4
  import os
5
  import subprocess
 
11
  from huggingface_hub import hf_hub_url, cached_download, HfApi
12
  import re
13
  from typing import List, Dict
14
+ import streamlit as st
15
+ from streamlit_jupyter import StreamlitPatcher, tqdm
16
+
17
+ StreamlitPatcher().jupyter() # This patches Streamlit to work in Jupyter
18
+
19
 
20
  # Access Hugging Face API key from secrets
21
  hf_token = st.secrets["hf_token"]