Spaces:
Sleeping
Sleeping
feat(QuestionModel): Complete for deploy
Browse files- src/streamlit_app.py +4 -4
src/streamlit_app.py
CHANGED
|
@@ -17,7 +17,7 @@ class StreamlitConfigUI:
|
|
| 17 |
A Streamlit UI class that uses ConfigParser to load settings from an INI file.
|
| 18 |
"""
|
| 19 |
|
| 20 |
-
def __init__(self, config_file: str = "
|
| 21 |
"""
|
| 22 |
Initialize the UI class with configuration file.
|
| 23 |
|
|
@@ -92,9 +92,9 @@ if __name__=='__main__':
|
|
| 92 |
user_input=ui.load_streamlit_ui()
|
| 93 |
LLM_Selection=ModelSelection(user_input)
|
| 94 |
if user_input["GENAI_API_KEY"]:llm=LLM_Selection.setup_llm_model()
|
| 95 |
-
loaded_tokenizer = DistilBertTokenizerFast.from_pretrained('
|
| 96 |
-
loaded_model = TFDistilBertForSequenceClassification.from_pretrained('
|
| 97 |
-
df_keys=pd.read_csv('train_bert/training_data/Keyword_Patterns.csv')
|
| 98 |
|
| 99 |
if not user_input:
|
| 100 |
st.error("Error: Failed to load user input from the UI.")
|
|
|
|
| 17 |
A Streamlit UI class that uses ConfigParser to load settings from an INI file.
|
| 18 |
"""
|
| 19 |
|
| 20 |
+
def __init__(self, config_file: str = "src/streamlitui/uiconfigfile.ini"):
|
| 21 |
"""
|
| 22 |
Initialize the UI class with configuration file.
|
| 23 |
|
|
|
|
| 92 |
user_input=ui.load_streamlit_ui()
|
| 93 |
LLM_Selection=ModelSelection(user_input)
|
| 94 |
if user_input["GENAI_API_KEY"]:llm=LLM_Selection.setup_llm_model()
|
| 95 |
+
loaded_tokenizer = DistilBertTokenizerFast.from_pretrained('src/train_bert/topic_classifier_model')
|
| 96 |
+
loaded_model = TFDistilBertForSequenceClassification.from_pretrained('src/train_bert/topic_classifier_model')
|
| 97 |
+
df_keys=pd.read_csv('src/train_bert/training_data/Keyword_Patterns.csv')
|
| 98 |
|
| 99 |
if not user_input:
|
| 100 |
st.error("Error: Failed to load user input from the UI.")
|