Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def load_models():
|
|
69 |
# Load the text-classification pipeline (acting as our scoring model).
|
70 |
sentiment_pipe = pipeline("text-classification", model="mixedbread-ai/mxbai-rerank-base-v1")
|
71 |
# Load the Gemma text generation pipeline.
|
72 |
-
gemma_pipe = pipeline("text-generation", model="google/gemma-3-1b-it"
|
73 |
return sentiment_pipe, gemma_pipe
|
74 |
|
75 |
sentiment_pipe, gemma_pipe = load_models()
|
@@ -93,7 +93,7 @@ if uploaded_file is not None:
|
|
93 |
else:
|
94 |
# If no CSV uploaded, split the query text into sentences as candidate documents.
|
95 |
if query_input.strip():
|
96 |
-
candidate_docs = re.split(r'(?<=[.!?])
|
97 |
|
98 |
if st.button("Generate Report"):
|
99 |
if not query_input.strip():
|
|
|
69 |
# Load the text-classification pipeline (acting as our scoring model).
|
70 |
sentiment_pipe = pipeline("text-classification", model="mixedbread-ai/mxbai-rerank-base-v1")
|
71 |
# Load the Gemma text generation pipeline.
|
72 |
+
gemma_pipe = pipeline("text-generation", model="google/gemma-3-1b-it")
|
73 |
return sentiment_pipe, gemma_pipe
|
74 |
|
75 |
sentiment_pipe, gemma_pipe = load_models()
|
|
|
93 |
else:
|
94 |
# If no CSV uploaded, split the query text into sentences as candidate documents.
|
95 |
if query_input.strip():
|
96 |
+
candidate_docs = re.split(r'(?<=[.!?])\s+', query_input.strip())
|
97 |
|
98 |
if st.button("Generate Report"):
|
99 |
if not query_input.strip():
|