Upload server/__init__.py with huggingface_hub
Browse files- server/__init__.py +31 -31
server/__init__.py
CHANGED
|
@@ -1,31 +1,31 @@
|
|
| 1 |
-
"""Server module for HallucinationGuard-Env."""
|
| 2 |
-
|
| 3 |
-
import sys
|
| 4 |
-
import os
|
| 5 |
-
|
| 6 |
-
# Add server directory to path for relative imports
|
| 7 |
-
_server_dir = os.path.dirname(os.path.abspath(__file__))
|
| 8 |
-
if _server_dir not in sys.path:
|
| 9 |
-
sys.path.insert(0, _server_dir)
|
| 10 |
-
|
| 11 |
-
# Now import from same directory (works for both local and HF Spaces)
|
| 12 |
-
from environment import HallucinationEnvironment
|
| 13 |
-
from grader import (
|
| 14 |
-
calculate_reward,
|
| 15 |
-
check_factual_accuracy_advanced,
|
| 16 |
-
check_quote_in_context_advanced,
|
| 17 |
-
detect_hallucination_advanced,
|
| 18 |
-
generate_feedback,
|
| 19 |
-
)
|
| 20 |
-
from dataset_loader import DatasetLoader, QAExample
|
| 21 |
-
|
| 22 |
-
__all__ = [
|
| 23 |
-
"HallucinationEnvironment",
|
| 24 |
-
"calculate_reward",
|
| 25 |
-
"check_factual_accuracy_advanced",
|
| 26 |
-
"check_quote_in_context_advanced",
|
| 27 |
-
"detect_hallucination_advanced",
|
| 28 |
-
"generate_feedback",
|
| 29 |
-
"DatasetLoader",
|
| 30 |
-
"QAExample",
|
| 31 |
-
]
|
|
|
|
| 1 |
+
"""Server module for HallucinationGuard-Env."""
|
| 2 |
+
|
| 3 |
+
import sys
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
# Add server directory to path for relative imports
|
| 7 |
+
_server_dir = os.path.dirname(os.path.abspath(__file__))
|
| 8 |
+
if _server_dir not in sys.path:
|
| 9 |
+
sys.path.insert(0, _server_dir)
|
| 10 |
+
|
| 11 |
+
# Now import from same directory (works for both local and HF Spaces)
|
| 12 |
+
from environment import HallucinationEnvironment
|
| 13 |
+
from grader import (
|
| 14 |
+
calculate_reward,
|
| 15 |
+
check_factual_accuracy_advanced,
|
| 16 |
+
check_quote_in_context_advanced,
|
| 17 |
+
detect_hallucination_advanced,
|
| 18 |
+
generate_feedback,
|
| 19 |
+
)
|
| 20 |
+
from dataset_loader import DatasetLoader, QAExample
|
| 21 |
+
|
| 22 |
+
__all__ = [
|
| 23 |
+
"HallucinationEnvironment",
|
| 24 |
+
"calculate_reward",
|
| 25 |
+
"check_factual_accuracy_advanced",
|
| 26 |
+
"check_quote_in_context_advanced",
|
| 27 |
+
"detect_hallucination_advanced",
|
| 28 |
+
"generate_feedback",
|
| 29 |
+
"DatasetLoader",
|
| 30 |
+
"QAExample",
|
| 31 |
+
]
|