Spaces:
GIZ
/
Running on CPU Upgrade

prashant commited on
Commit
c4409b1
1 Parent(s): a7ec5dd

decorator test

Browse files
appStore/sdg_analysis.py CHANGED
@@ -14,9 +14,9 @@ import docx
14
  from docx.shared import Inches
15
  from docx.shared import Pt
16
  from docx.enum.style import WD_STYLE_TYPE
17
- from utils.sdg_classifier import sdg_classification
18
  from utils.sdg_classifier import runSDGPreprocessingPipeline
19
- from utils.streamlitcheck import check_streamlit
20
  import tempfile
21
  import sqlite3
22
  import logging
 
14
  from docx.shared import Inches
15
  from docx.shared import Pt
16
  from docx.enum.style import WD_STYLE_TYPE
17
+ from utils.sdg_classifier import sdg_classification, check_streamlit
18
  from utils.sdg_classifier import runSDGPreprocessingPipeline
19
+ # from utils.streamlitcheck import check_streamlit
20
  import tempfile
21
  import sqlite3
22
  import logging
utils/streamlitcheck.py CHANGED
@@ -1,19 +1,2 @@
1
- def check_streamlit():
2
- """
3
- Function to check whether python code is run within streamlit
4
 
5
- Returns
6
- -------
7
- use_streamlit : boolean
8
- True if code is run within streamlit, else False
9
- """
10
- try:
11
- from st.script_run_context import get_script_run_ctx
12
- if not get_script_run_ctx():
13
- use_streamlit = False
14
- else:
15
- use_streamlit = True
16
- except ModuleNotFoundError:
17
- use_streamlit = False
18
- return use_streamlit
19
 
 
 
 
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2