Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ from huggingface_hub import login
|
|
6 |
|
7 |
HUGGINGFACEHUB_API_TOKEN = os.environ.get("HF_TOKEN")
|
8 |
|
|
|
|
|
9 |
demo_conversation = """[
|
10 |
{"role": "system", "content": "You are a helpful chatbot."},
|
11 |
{"role": "user", "content": "Hi there!"},
|
@@ -53,7 +55,7 @@ def apply_chat_template(model_name, test_conversation, add_generation_prompt, cl
|
|
53 |
return str(e)
|
54 |
|
55 |
with gr.Blocks() as demo:
|
56 |
-
model_name_input = gr.Textbox(label="Model Name", placeholder="Enter model name")
|
57 |
template_dropdown = gr.Dropdown(label="Template Name", choices=[], interactive=True)
|
58 |
conversation_input = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
|
59 |
add_generation_prompt_checkbox = gr.Checkbox(value=False, label="Add generation prompt")
|
|
|
6 |
|
7 |
HUGGINGFACEHUB_API_TOKEN = os.environ.get("HF_TOKEN")
|
8 |
|
9 |
+
default_model="meta-llama/Meta-Llama-3-8B-Instruct"
|
10 |
+
|
11 |
demo_conversation = """[
|
12 |
{"role": "system", "content": "You are a helpful chatbot."},
|
13 |
{"role": "user", "content": "Hi there!"},
|
|
|
55 |
return str(e)
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
+
model_name_input = gr.Textbox(label="Model Name", placeholder="Enter model name", value=default_model)
|
59 |
template_dropdown = gr.Dropdown(label="Template Name", choices=[], interactive=True)
|
60 |
conversation_input = gr.TextArea(value=demo_conversation, lines=6, label="Conversation")
|
61 |
add_generation_prompt_checkbox = gr.Checkbox(value=False, label="Add generation prompt")
|