Skip to content

Commit

Permalink
fix web ui demo
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga committed Nov 16, 2023
1 parent 1c80e9a commit 10ce87e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/llmtuner/webui/chatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ def __init__(
if not lazy_init: # read arguments from command line
super().__init__()

if demo_mode: # load config.json by default
if demo_mode: # load demo_config.json if exists
import json
try:
with open("demo_config.json", "r", encoding="utf-8") as f:
args = json.load(f)
super().__init__(args)
except:
raise ValueError("Cannot find `demo_config.json` at current directory.")
super().__init__(args)
print("Cannot find `demo_config.json` at current directory.")

@property
def loaded(self) -> bool:
Expand Down

0 comments on commit 10ce87e

Please sign in to comment.