tonic
commited on
Commit
·
c9d06d9
1
Parent(s):
c5e63bf
Update app.py
Browse files
app.py
CHANGED
@@ -46,12 +46,11 @@ def main():
|
|
46 |
with gr.Blocks() as demo:
|
47 |
gr.Markdown(title)
|
48 |
with gr.Row():
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
-
|
55 |
with gr.Accordion("Advanced Settings"):
|
56 |
with gr.Row():
|
57 |
max_new_tokens = gr.Slider(label="Max new tokens", value=125, minimum=25, maximum=1250)
|
@@ -61,14 +60,11 @@ def main():
|
|
61 |
do_sample = gr.Checkbox(label="Do sample", value=False)
|
62 |
|
63 |
output_text = gr.Textbox(label="🐯📏TigerAI-StructLM-7B", interactive=True)
|
64 |
-
|
65 |
-
gr.Button("Try
|
66 |
predict_math_bot,
|
67 |
-
inputs=[
|
68 |
outputs=output_text
|
69 |
)
|
70 |
-
|
71 |
-
demo.launch()
|
72 |
|
73 |
-
|
74 |
-
main()
|
|
|
46 |
with gr.Blocks() as demo:
|
47 |
gr.Markdown(title)
|
48 |
with gr.Row():
|
49 |
+
system_message_input = gr.Textbox(label="📉System Prompt", placeholder=system_message) # Renamed variable
|
50 |
+
assistant_message_input = gr.Textbox(label="Assistant Message", placeholder=assistant_message) # Renamed variable
|
51 |
+
tabular_data_input = gr.Textbox(label="Tabular Data", placeholder=tabular_data) # Renamed variable
|
52 |
+
user_message_input = gr.Textbox(label="🫡Enter your query here...", placeholder=user_message) # Renamed variable
|
53 |
|
|
|
54 |
with gr.Accordion("Advanced Settings"):
|
55 |
with gr.Row():
|
56 |
max_new_tokens = gr.Slider(label="Max new tokens", value=125, minimum=25, maximum=1250)
|
|
|
60 |
do_sample = gr.Checkbox(label="Do sample", value=False)
|
61 |
|
62 |
output_text = gr.Textbox(label="🐯📏TigerAI-StructLM-7B", interactive=True)
|
63 |
+
|
64 |
+
gr.Button("Try🐯📏TigerAI-StructLM").click(
|
65 |
predict_math_bot,
|
66 |
+
inputs=[user_message_input, system_message_input, assistant_message_input, tabular_data_input, max_new_tokens, temperature, top_p, repetition_penalty, do_sample],
|
67 |
outputs=output_text
|
68 |
)
|
|
|
|
|
69 |
|
70 |
+
demo.launch()
|
|