Skip to content

Commit

Permalink
fix templates file location
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBinder committed Oct 30, 2023
1 parent 7375f10 commit 0e58d0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from functools import partial
from pathlib import Path
from typing import List, Tuple, Dict, Iterator, Union

import gradio as gr
Expand Down Expand Up @@ -31,6 +32,7 @@
"watermark": False,
"decoder_input_details": False,
}
TEMPLATES_FILE = Path(__file__).parent / "templates.json"
DEFAULT_TEMPLATE = "upstage/SOLAR-0-70b-16bit"


Expand Down Expand Up @@ -113,7 +115,7 @@ def update_template_and_system_prior(template_key, template_str, system_prior, t

def start():
# load templates from json file
templates = json.load(open("templates.json"))
templates = json.load(open(TEMPLATES_FILE))
# endpoint with info
endpoint = gr.Textbox(lines=1, label="Address", value=DEFAULT_API_ENDPOINT)
endpoint_info = gr.JSON(label="Endpoint info")
Expand Down

0 comments on commit 0e58d0b

Please sign in to comment.