ranWang commited on
Commit
b2e9a93
1 Parent(s): b77b595

add reset svg

Browse files
Files changed (3) hide show
  1. app.css +10 -1
  2. app.py +7 -4
  3. static/icon/reset.svg +1 -0
app.css CHANGED
@@ -39,10 +39,19 @@
39
  .probelm-example-another {
40
  position: absolute;
41
  top: 0;
42
- right: 44.8px;
43
  border-left: 1px solid rgba(0, 0, 0, 0.15);
44
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
45
  border-radius: 0 0px 0 10px;
 
 
 
 
 
 
 
 
 
46
  }
47
 
48
  .probelm-example-copy {
 
39
  .probelm-example-another {
40
  position: absolute;
41
  top: 0;
42
+ right: 28.4px;
43
  border-left: 1px solid rgba(0, 0, 0, 0.15);
44
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
45
  border-radius: 0 0px 0 10px;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ height: 28px;
50
+ }
51
+
52
+ .probelm-example-another > svg {
53
+ height: 18px;
54
+ width: 18px;
55
  }
56
 
57
  .probelm-example-copy {
app.py CHANGED
@@ -752,6 +752,9 @@ def clear():
752
  with open("app.css", "r") as f:
753
  css = f.read()
754
 
 
 
 
755
  latex_delimiters = [
756
  {"left": "[", "right": "]", "display": True},
757
  ]
@@ -770,7 +773,7 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
770
  gr.HTML("Probelm example", elem_classes="probelm-example-title-content")
771
 
772
  with gr.Blocks(elem_classes="action-container"):
773
- gr.HTML("another", elem_classes="probelm-example-another")
774
  gr.HTML("copy", elem_classes="probelm-example-copy")
775
 
776
  with gr.Row(elem_classes="copy-icon-container"):
@@ -780,18 +783,18 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
780
  elem_classes="probelm-example-content",
781
  )
782
 
 
 
783
  with gr.Accordion("Advanced Options", open=False):
784
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.1, step=0.1, label="Temperature")
785
 
786
- inp = gr.Textbox(placeholder="Problem", label="Problem input", lines=5)
787
-
788
  with gr.Row():
789
  btn = gr.Button("Run")
790
  btn_clear = gr.Button("Clear")
791
 
792
  with gr.Column(scale=1, elem_classes="right"):
793
  gr.HTML("Solution", elem_classes="solution-title-content")
794
- out = gr.Markdown(latex_delimiters=latex_delimiters)
795
 
796
  if __name__ == "__main__":
797
  demo.queue(default_concurrency_limit=5).launch()
 
752
  with open("app.css", "r") as f:
753
  css = f.read()
754
 
755
+ with open("./static/icon/reset.svg", "r") as f:
756
+ reset_svg = f.read()
757
+
758
  latex_delimiters = [
759
  {"left": "[", "right": "]", "display": True},
760
  ]
 
773
  gr.HTML("Probelm example", elem_classes="probelm-example-title-content")
774
 
775
  with gr.Blocks(elem_classes="action-container"):
776
+ gr.HTML(reset_svg, elem_classes="probelm-example-another")
777
  gr.HTML("copy", elem_classes="probelm-example-copy")
778
 
779
  with gr.Row(elem_classes="copy-icon-container"):
 
783
  elem_classes="probelm-example-content",
784
  )
785
 
786
+ inp = gr.Textbox(placeholder="Problem", label="Problem input", lines=5)
787
+
788
  with gr.Accordion("Advanced Options", open=False):
789
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.1, step=0.1, label="Temperature")
790
 
 
 
791
  with gr.Row():
792
  btn = gr.Button("Run")
793
  btn_clear = gr.Button("Clear")
794
 
795
  with gr.Column(scale=1, elem_classes="right"):
796
  gr.HTML("Solution", elem_classes="solution-title-content")
797
+ out = gr.Markdown(elem_classes="solution-content", latex_delimiters=latex_delimiters)
798
 
799
  if __name__ == "__main__":
800
  demo.queue(default_concurrency_limit=5).launch()
static/icon/reset.svg ADDED