Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ repos:
"--ignore=tests/generator",
"--ignore=data",
"--ignore=examples"
]
]
14 changes: 14 additions & 0 deletions ui/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[browser]
gatherUsageStats = false

[server]
headless = true
runOnSave = true

[theme]
# Modern dark theme with purple accent
primaryColor = "#6366F1"
backgroundColor = "#0F172A"
secondaryBackgroundColor = "#1E293B"
textColor = "#F1F5F9"
font = "sans serif"
90 changes: 90 additions & 0 deletions ui/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
"""
OpenJudge Studio - A modern LLM evaluation interface.

This is the main entry point for the Streamlit application.
The application uses the OpenJudge framework's built-in Graders and Models.
"""

import sys
from pathlib import Path

# Add the ui directory to Python path for local imports
UI_DIR = Path(__file__).parent
if str(UI_DIR) not in sys.path:
sys.path.insert(0, str(UI_DIR))

# pylint: disable=wrong-import-position
import streamlit as st # noqa: E402
from components.input_panel import render_input_panel, render_run_button # noqa: E402
from components.result_panel import render_result_panel # noqa: E402
from components.shared import ( # noqa: E402
render_divider,
render_footer,
render_header,
render_quick_guide,
)
from components.sidebar import render_sidebar # noqa: E402
from config.constants import APP_NAME # noqa: E402
from styles.theme import inject_css # noqa: E402

# pylint: enable=wrong-import-position

# ============================================================================
# Page Configuration (must be first Streamlit command)
# ============================================================================
st.set_page_config(
page_title=APP_NAME,
page_icon="⚖️",
layout="wide",
initial_sidebar_state="expanded",
)


def main() -> None:
"""Main function to run the OpenJudge Studio application."""
# Inject custom CSS
inject_css()

# ========================================================================
# Sidebar Configuration
# ========================================================================
sidebar_config = render_sidebar()

# ========================================================================
# Main Content Area
# ========================================================================

# Header
render_header()

# Quick start guide (collapsible)
with st.expander("Quick Start Guide", expanded=False):
render_quick_guide()

render_divider()

# Two-column layout
col_input, col_result = st.columns([1, 1], gap="large")

# ========================================================================
# Input Column
# ========================================================================
with col_input:
input_data = render_input_panel(sidebar_config)
run_flag = render_run_button(sidebar_config, input_data)

# ========================================================================
# Result Column
# ========================================================================
with col_result:
render_result_panel(sidebar_config, input_data, run_flag)

# ========================================================================
# Footer
# ========================================================================
render_footer()


if __name__ == "__main__":
main()
6 changes: 6 additions & 0 deletions ui/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions ui/components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
"""UI Components module for OpenJudge Studio."""

from components.input_panel import render_input_panel
from components.result_panel import render_result_panel
from components.shared import render_footer, render_header, render_quick_guide
from components.sidebar import render_sidebar

__all__ = [
"render_sidebar",
"render_input_panel",
"render_result_panel",
"render_header",
"render_footer",
"render_quick_guide",
]
Loading