Spaces:
Runtime error
Runtime error
update png from
Browse files
app.css
CHANGED
@@ -42,6 +42,7 @@
|
|
42 |
right: 50px;
|
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;
|
|
|
42 |
right: 50px;
|
43 |
border-left: 1px solid rgba(0, 0, 0, 0.15);
|
44 |
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
|
45 |
+
border-top: 0;
|
46 |
border-radius: 0 0px 0 10px;
|
47 |
display: flex;
|
48 |
align-items: center;
|
app.py
CHANGED
@@ -15,11 +15,13 @@ from sympy import N, simplify
|
|
15 |
from sympy.parsing.latex import parse_latex
|
16 |
from openai import OpenAI
|
17 |
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
23 |
|
24 |
|
25 |
@dataclass
|
@@ -727,6 +729,7 @@ example_data = datasets.load_dataset(
|
|
727 |
with open("app.css", "r") as f:
|
728 |
css = f.read()
|
729 |
|
|
|
730 |
latex_delimiters = [
|
731 |
{"left": "[", "right": "]", "display": True},
|
732 |
]
|
@@ -770,7 +773,7 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
770 |
gr.Button(
|
771 |
"",
|
772 |
elem_classes="probelm-example-another",
|
773 |
-
icon="
|
774 |
)
|
775 |
copy_btn = gr.Button("Copy", elem_classes="probelm-example-copy")
|
776 |
|
|
|
15 |
from sympy.parsing.latex import parse_latex
|
16 |
from openai import OpenAI
|
17 |
|
18 |
+
import base64
|
19 |
|
20 |
+
|
21 |
+
client = OpenAI(
|
22 |
+
base_url=os.environ.get("SERVER_URL"),
|
23 |
+
api_key=os.environ.get("HF_TOKEN"),
|
24 |
+
)
|
25 |
|
26 |
|
27 |
@dataclass
|
|
|
729 |
with open("app.css", "r") as f:
|
730 |
css = f.read()
|
731 |
|
732 |
+
|
733 |
latex_delimiters = [
|
734 |
{"left": "[", "right": "]", "display": True},
|
735 |
]
|
|
|
773 |
gr.Button(
|
774 |
"",
|
775 |
elem_classes="probelm-example-another",
|
776 |
+
icon="./static/images/reset.png",
|
777 |
)
|
778 |
copy_btn = gr.Button("Copy", elem_classes="probelm-example-copy")
|
779 |
|