Spaces:
Sleeping
Sleeping
Commit
·
006f396
1
Parent(s):
316f8fe
update requirements
Browse files
requirements.txt
CHANGED
|
@@ -18,6 +18,7 @@ nltk
|
|
| 18 |
numpy
|
| 19 |
torch
|
| 20 |
sentence-transformers
|
|
|
|
| 21 |
|
| 22 |
# Images
|
| 23 |
pillow==10.1.0
|
|
|
|
| 18 |
numpy
|
| 19 |
torch
|
| 20 |
sentence-transformers
|
| 21 |
+
accelerate
|
| 22 |
|
| 23 |
# Images
|
| 24 |
pillow==10.1.0
|
src/application/text/model_detection.py
CHANGED
|
@@ -44,4 +44,4 @@ def detect_text_by_ai_model(
|
|
| 44 |
return label, confidence_score
|
| 45 |
except Exception as e: # Add exception handling
|
| 46 |
print(f"Error in Roberta model inference: {e}")
|
| 47 |
-
return UNKNOWN,
|
|
|
|
| 44 |
return label, confidence_score
|
| 45 |
except Exception as e: # Add exception handling
|
| 46 |
print(f"Error in Roberta model inference: {e}")
|
| 47 |
+
return UNKNOWN, 0.5 # Return UNKNOWN and 0.0 confidence if error
|