Spaces:
Sleeping
Sleeping
Commit
·
9c8ee42
1
Parent(s):
5d10ab6
cut 2.23
Browse files
app.py
CHANGED
@@ -320,12 +320,15 @@ class EventDetector:
|
|
320 |
|
321 |
# Higher threshold for positive to reduce false positives
|
322 |
if label in ['positive', 'pos', 'positive tone'] and score > 0.75:
|
|
|
323 |
return "Positive"
|
324 |
# Lower threshold for negative to catch more cases
|
325 |
elif label in ['negative', 'neg', 'negative tone'] and score > 0.75:
|
|
|
326 |
return "Negative"
|
327 |
# Consider high-confidence neutral predictions
|
328 |
elif label == 'neutral' and score > 0.8:
|
|
|
329 |
return "Neutral"
|
330 |
# Default to negative for uncertain cases in financial context
|
331 |
else:
|
@@ -906,7 +909,7 @@ def create_interface():
|
|
906 |
# Create state for file data
|
907 |
current_file = gr.State(None)
|
908 |
|
909 |
-
gr.Markdown("# AI-анализ мониторинга новостей v.2.
|
910 |
|
911 |
with gr.Row():
|
912 |
file_input = gr.File(
|
|
|
320 |
|
321 |
# Higher threshold for positive to reduce false positives
|
322 |
if label in ['positive', 'pos', 'positive tone'] and score > 0.75:
|
323 |
+
logger.info(f"Positive: {str(score)}")
|
324 |
return "Positive"
|
325 |
# Lower threshold for negative to catch more cases
|
326 |
elif label in ['negative', 'neg', 'negative tone'] and score > 0.75:
|
327 |
+
logger.info(f"Negative: {str(score)}")
|
328 |
return "Negative"
|
329 |
# Consider high-confidence neutral predictions
|
330 |
elif label == 'neutral' and score > 0.8:
|
331 |
+
logger.info(f"Neutral: {str(score)}")
|
332 |
return "Neutral"
|
333 |
# Default to negative for uncertain cases in financial context
|
334 |
else:
|
|
|
909 |
# Create state for file data
|
910 |
current_file = gr.State(None)
|
911 |
|
912 |
+
gr.Markdown("# AI-анализ мониторинга новостей v.2.23 + extn")
|
913 |
|
914 |
with gr.Row():
|
915 |
file_input = gr.File(
|