burman-ai commited on
Commit
50e8a6e
·
verified ·
1 Parent(s): d2f44d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -80,7 +80,7 @@ def respond(
80
 
81
  # GRADIO UI
82
 
83
- chatbot = gr.Chatbot(height=600, show_copy_button=True, placeholder="", likeable=True, layout="panel")
84
  print("Chatbot interface created.")
85
 
86
  system_message_box = gr.Textbox(value="", placeholder="You are a helpful assistant.", label="System Prompt")
@@ -124,8 +124,8 @@ seed_slider = gr.Slider(
124
  # The custom_model_box is what the respond function sees as "custom_model"
125
  custom_model_box = gr.Textbox(
126
  value="meta-llama/Llama-3.2-3B-Instruct",
127
- label="AI Model is",
128
- info="",
129
  placeholder="meta-llama/Llama-3.2-3B-Instruct"
130
  )
131
 
@@ -141,22 +141,18 @@ demo = gr.ChatInterface(
141
  fn=respond,
142
  additional_inputs=[
143
  system_message_box,
144
- custom_model_box,
145
  max_tokens_slider,
146
  temperature_slider,
147
  top_p_slider,
148
  frequency_penalty_slider,
149
  seed_slider,
150
-
151
-
152
-
153
-
154
  ],
155
  fill_height=True,
156
  chatbot=chatbot,
157
  theme="Nymbo/Nymbo_Theme",
158
  )
159
- print("ChatInterface object created.")
160
 
161
  with demo:
162
  with gr.Accordion("Model Selection", open=False):
 
80
 
81
  # GRADIO UI
82
 
83
+ chatbot = gr.Chatbot(height=600, show_copy_button=True, placeholder="Select a model and begin chatting", likeable=True, layout="panel")
84
  print("Chatbot interface created.")
85
 
86
  system_message_box = gr.Textbox(value="", placeholder="You are a helpful assistant.", label="System Prompt")
 
124
  # The custom_model_box is what the respond function sees as "custom_model"
125
  custom_model_box = gr.Textbox(
126
  value="meta-llama/Llama-3.2-3B-Instruct",
127
+ label="AI Mode isl",
128
+ info="(Optional) Provide a custom Hugging Face model path. Overrides any selected featured model.",
129
  placeholder="meta-llama/Llama-3.2-3B-Instruct"
130
  )
131
 
 
141
  fn=respond,
142
  additional_inputs=[
143
  system_message_box,
 
144
  max_tokens_slider,
145
  temperature_slider,
146
  top_p_slider,
147
  frequency_penalty_slider,
148
  seed_slider,
149
+ custom_model_box,
 
 
 
150
  ],
151
  fill_height=True,
152
  chatbot=chatbot,
153
  theme="Nymbo/Nymbo_Theme",
154
  )
155
+ print("Chat Interface object created.")
156
 
157
  with demo:
158
  with gr.Accordion("Model Selection", open=False):