Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -205,8 +205,27 @@ def generate_spec(
|
|
| 205 |
|
| 206 |
|
| 207 |
def create_app():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
with gr.Blocks(
|
| 209 |
title="CodeWraith - Module-to-Spec Transformer",
|
|
|
|
| 210 |
) as app:
|
| 211 |
gr.Markdown(
|
| 212 |
"# CodeWraith\n"
|
|
@@ -224,7 +243,7 @@ def create_app():
|
|
| 224 |
with gr.Row():
|
| 225 |
temperature = gr.Slider(0.0, 2.0, value=0.7, step=0.1, label="Temperature")
|
| 226 |
top_p = gr.Slider(0.0, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 227 |
-
max_tokens = gr.Slider(256, 8192, value=
|
| 228 |
with gr.Row():
|
| 229 |
use_rag = gr.Checkbox(value=True, label="Use RAG (retrieve similar examples)")
|
| 230 |
generate_btn = gr.Button("Generate Specification", variant="primary")
|
|
|
|
| 205 |
|
| 206 |
|
| 207 |
def create_app():
|
| 208 |
+
mermaid_css = """
|
| 209 |
+
.mermaid .node rect,
|
| 210 |
+
.mermaid .node polygon,
|
| 211 |
+
.mermaid .node circle {
|
| 212 |
+
fill: #e8f0fe !important;
|
| 213 |
+
stroke: #4a6fa5 !important;
|
| 214 |
+
}
|
| 215 |
+
.mermaid .nodeLabel,
|
| 216 |
+
.mermaid .edgeLabel,
|
| 217 |
+
.mermaid text {
|
| 218 |
+
color: #1a1a1a !important;
|
| 219 |
+
fill: #1a1a1a !important;
|
| 220 |
+
}
|
| 221 |
+
.mermaid .edgePath .path {
|
| 222 |
+
stroke: #4a6fa5 !important;
|
| 223 |
+
}
|
| 224 |
+
"""
|
| 225 |
+
|
| 226 |
with gr.Blocks(
|
| 227 |
title="CodeWraith - Module-to-Spec Transformer",
|
| 228 |
+
css=mermaid_css,
|
| 229 |
) as app:
|
| 230 |
gr.Markdown(
|
| 231 |
"# CodeWraith\n"
|
|
|
|
| 243 |
with gr.Row():
|
| 244 |
temperature = gr.Slider(0.0, 2.0, value=0.7, step=0.1, label="Temperature")
|
| 245 |
top_p = gr.Slider(0.0, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 246 |
+
max_tokens = gr.Slider(256, 8192, value=4096, step=256, label="Max Tokens")
|
| 247 |
with gr.Row():
|
| 248 |
use_rag = gr.Checkbox(value=True, label="Use RAG (retrieve similar examples)")
|
| 249 |
generate_btn = gr.Button("Generate Specification", variant="primary")
|