Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -261,33 +261,50 @@ def main():
|
|
261 |
st.sidebar.markdown("## 🎮 Game Stats")
|
262 |
st.sidebar.markdown(f"### 🏆 Total Points: {st.session_state.total_points}")
|
263 |
st.sidebar.markdown(f"### 🎲 Rounds Played: {st.session_state.rounds_played}")
|
264 |
-
|
265 |
-
|
266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
for i, sentence in enumerate(st.session_state.game.current_sentences):
|
268 |
-
st.
|
|
|
|
|
|
|
|
|
269 |
|
270 |
-
# Boundary selection
|
|
|
271 |
guess = st.radio(
|
272 |
"Where do you think the AI-generated text begins?",
|
273 |
options=[str(i+1) for i in range(len(st.session_state.game.current_sentences))]
|
274 |
)
|
275 |
|
276 |
-
# Reason input with predefined options
|
277 |
-
st.
|
278 |
reason_options = st.session_state.game.predefined_reasons
|
279 |
selected_predefined_reasons = st.multiselect(
|
280 |
-
"Select
|
281 |
options=reason_options
|
282 |
)
|
283 |
|
284 |
# Custom reason input
|
285 |
-
custom_reason = st.text_area("Additional
|
286 |
|
287 |
# Combine predefined and custom reasons
|
288 |
full_reason = " ".join(selected_predefined_reasons)
|
289 |
if custom_reason:
|
290 |
full_reason += f" {custom_reason}"
|
|
|
|
|
291 |
|
292 |
# Guess submission
|
293 |
if st.button("Submit Guess"):
|
|
|
261 |
st.sidebar.markdown("## 🎮 Game Stats")
|
262 |
st.sidebar.markdown(f"### 🏆 Total Points: {st.session_state.total_points}")
|
263 |
st.sidebar.markdown(f"### 🎲 Rounds Played: {st.session_state.rounds_played}")
|
264 |
+
|
265 |
+
# Animated difficulty indicator
|
266 |
+
difficulty_map = {
|
267 |
+
'gpt2': '🟢 Easy',
|
268 |
+
'gpt2-xl': '🟠 Medium',
|
269 |
+
'ctrl': '🔴 Hard'
|
270 |
+
}
|
271 |
+
current_model = st.session_state.game.current_sample['model']
|
272 |
+
difficulty = difficulty_map.get(current_model, '⚪ Unknown')
|
273 |
+
st.sidebar.markdown(f"### 🎯 Difficulty: {difficulty}")
|
274 |
+
|
275 |
+
# Display sentences with enhanced styling
|
276 |
+
st.subheader("🔍 Examine the Text Carefully")
|
277 |
for i, sentence in enumerate(st.session_state.game.current_sentences):
|
278 |
+
st.markdown(f"""
|
279 |
+
<div class='sentence-container'>
|
280 |
+
<strong>{i+1}.</strong> {sentence}
|
281 |
+
</div>
|
282 |
+
""", unsafe_allow_html=True)
|
283 |
|
284 |
+
# Boundary selection with visual improvements
|
285 |
+
st.markdown("### 🚨 Detect AI Transition Point")
|
286 |
guess = st.radio(
|
287 |
"Where do you think the AI-generated text begins?",
|
288 |
options=[str(i+1) for i in range(len(st.session_state.game.current_sentences))]
|
289 |
)
|
290 |
|
291 |
+
# Reason input with predefined options and visual enhancements
|
292 |
+
st.markdown("### 🧐 Explain Your Reasoning")
|
293 |
reason_options = st.session_state.game.predefined_reasons
|
294 |
selected_predefined_reasons = st.multiselect(
|
295 |
+
"Select indicators of AI generation",
|
296 |
options=reason_options
|
297 |
)
|
298 |
|
299 |
# Custom reason input
|
300 |
+
custom_reason = st.text_area("Additional detective notes (optional)")
|
301 |
|
302 |
# Combine predefined and custom reasons
|
303 |
full_reason = " ".join(selected_predefined_reasons)
|
304 |
if custom_reason:
|
305 |
full_reason += f" {custom_reason}"
|
306 |
+
|
307 |
+
|
308 |
|
309 |
# Guess submission
|
310 |
if st.button("Submit Guess"):
|