Spaces:
Running
Running
Jin Zhu
commited on
Commit
·
14dc59f
1
Parent(s):
683eed3
Update app.py
Browse files- src/app.py +5 -7
src/app.py
CHANGED
|
@@ -37,7 +37,7 @@ import time
|
|
| 37 |
# Page Configuration
|
| 38 |
# -----------------
|
| 39 |
st.set_page_config(
|
| 40 |
-
page_title="AdaDetectGPT
|
| 41 |
page_icon="🔍",
|
| 42 |
layout="wide"
|
| 43 |
)
|
|
@@ -108,7 +108,7 @@ def load_model(from_pretrained, base_model, cache_dir, device):
|
|
| 108 |
# Configuration
|
| 109 |
# -----------------
|
| 110 |
MODEL_CONFIG = {
|
| 111 |
-
'from_pretrained': 'mamba413/AdaDetectGPT-Model' if os.environ.get('SPACE_ID') else './FineTune/ckpt/lr_0.0001_a_1',
|
| 112 |
'base_model': 'gemma-1b',
|
| 113 |
'cache_dir': '../cache',
|
| 114 |
'device': 'mps',
|
|
@@ -145,7 +145,7 @@ except Exception as e:
|
|
| 145 |
_, col0, _ = st.columns((1, 5, 1))
|
| 146 |
with col0:
|
| 147 |
st.markdown(
|
| 148 |
-
"<h1 style='text-align: center; color: #0072C3;'>Adaptive LLM
|
| 149 |
unsafe_allow_html=True,
|
| 150 |
)
|
| 151 |
|
|
@@ -188,14 +188,12 @@ with col2:
|
|
| 188 |
|
| 189 |
pvalue_ph = st.empty()
|
| 190 |
pvalue_ph.text_input(
|
| 191 |
-
label="
|
| 192 |
value="",
|
| 193 |
disabled=True,
|
| 194 |
-
help="
|
| 195 |
)
|
| 196 |
|
| 197 |
-
st.markdown("---")
|
| 198 |
-
|
| 199 |
# -----------------
|
| 200 |
# Options Section
|
| 201 |
# -----------------
|
|
|
|
| 37 |
# Page Configuration
|
| 38 |
# -----------------
|
| 39 |
st.set_page_config(
|
| 40 |
+
page_title="AdaDetectGPT",
|
| 41 |
page_icon="🔍",
|
| 42 |
layout="wide"
|
| 43 |
)
|
|
|
|
| 108 |
# Configuration
|
| 109 |
# -----------------
|
| 110 |
MODEL_CONFIG = {
|
| 111 |
+
'from_pretrained': 'mamba413/AdaDetectGPT-Model' if os.environ.get('SPACE_ID') else './src/FineTune/ckpt/lr_0.0001_a_1',
|
| 112 |
'base_model': 'gemma-1b',
|
| 113 |
'cache_dir': '../cache',
|
| 114 |
'device': 'mps',
|
|
|
|
| 145 |
_, col0, _ = st.columns((1, 5, 1))
|
| 146 |
with col0:
|
| 147 |
st.markdown(
|
| 148 |
+
"<h1 style='text-align: center; color: #0072C3;'>AdaDetectGPT: Adaptive LLM-generated Text Detection</h1>",
|
| 149 |
unsafe_allow_html=True,
|
| 150 |
)
|
| 151 |
|
|
|
|
| 188 |
|
| 189 |
pvalue_ph = st.empty()
|
| 190 |
pvalue_ph.text_input(
|
| 191 |
+
label="p-value",
|
| 192 |
value="",
|
| 193 |
disabled=True,
|
| 194 |
+
help="p-value will appear here after clicking Detect.",
|
| 195 |
)
|
| 196 |
|
|
|
|
|
|
|
| 197 |
# -----------------
|
| 198 |
# Options Section
|
| 199 |
# -----------------
|