Spaces:
Running
Running
MekkCyber
commited on
Commit
·
ed1690e
1
Parent(s):
1b761b3
update
Browse files
app.py
CHANGED
@@ -109,7 +109,8 @@ def interface():
|
|
109 |
)
|
110 |
|
111 |
# Model Selection and Setup
|
112 |
-
with gr.
|
|
|
113 |
with gr.Row():
|
114 |
model_dropdown = gr.Dropdown(
|
115 |
label="Select Model",
|
@@ -125,8 +126,8 @@ def interface():
|
|
125 |
setup_status = gr.Textbox(label="Setup Status", interactive=False, placeholder="Setup status will appear here...")
|
126 |
|
127 |
# Inference Section
|
128 |
-
with gr.
|
129 |
-
gr.Markdown("<h2>BitNet Inference</h2>")
|
130 |
with gr.Row():
|
131 |
num_tokens = gr.Slider(
|
132 |
minimum=1, maximum=100,
|
@@ -135,7 +136,8 @@ def interface():
|
|
135 |
)
|
136 |
input_text = gr.Textbox(
|
137 |
label="Input Text",
|
138 |
-
placeholder="Enter your input text here..."
|
|
|
139 |
)
|
140 |
with gr.Row():
|
141 |
infer_button = gr.Button("Run Inference")
|
@@ -143,8 +145,8 @@ def interface():
|
|
143 |
time_output = gr.Textbox(label="Inference Time", interactive=False, placeholder="Inference time will appear here...")
|
144 |
|
145 |
# Comparison with Transformers Section
|
146 |
-
with gr.
|
147 |
-
gr.Markdown("<h2>Compare with Transformers</h2>")
|
148 |
with gr.Row():
|
149 |
transformer_model_dropdown = gr.Dropdown(
|
150 |
label="Select Transformers Model",
|
@@ -152,7 +154,7 @@ def interface():
|
|
152 |
value="TinyLlama/TinyLlama_v1.1",
|
153 |
interactive=True
|
154 |
)
|
155 |
-
input_text_tr = gr.Textbox(label="Input Text", placeholder="Enter your input text here...")
|
156 |
with gr.Row():
|
157 |
compare_button = gr.Button("Run Transformers Inference")
|
158 |
transformer_result_output = gr.Textbox(label="Transformers Output", interactive=False, placeholder="Transformers output will appear here...")
|
|
|
109 |
)
|
110 |
|
111 |
# Model Selection and Setup
|
112 |
+
with gr.Column(elem_id="container"):
|
113 |
+
gr.Markdown("<h2 style='color: #6A1B9A; text-align: center;'>Model Selection and Setup</h2>")
|
114 |
with gr.Row():
|
115 |
model_dropdown = gr.Dropdown(
|
116 |
label="Select Model",
|
|
|
126 |
setup_status = gr.Textbox(label="Setup Status", interactive=False, placeholder="Setup status will appear here...")
|
127 |
|
128 |
# Inference Section
|
129 |
+
with gr.Column(elem_id="container"):
|
130 |
+
gr.Markdown("<h2 style='color: #6A1B9A; text-align: center;'>BitNet Inference</h2>")
|
131 |
with gr.Row():
|
132 |
num_tokens = gr.Slider(
|
133 |
minimum=1, maximum=100,
|
|
|
136 |
)
|
137 |
input_text = gr.Textbox(
|
138 |
label="Input Text",
|
139 |
+
placeholder="Enter your input text here...",
|
140 |
+
value="Who is Zeus?"
|
141 |
)
|
142 |
with gr.Row():
|
143 |
infer_button = gr.Button("Run Inference")
|
|
|
145 |
time_output = gr.Textbox(label="Inference Time", interactive=False, placeholder="Inference time will appear here...")
|
146 |
|
147 |
# Comparison with Transformers Section
|
148 |
+
with gr.Column(elem_id="container"):
|
149 |
+
gr.Markdown("<h2 style='color: #6A1B9A; text-align: center;'>Compare with Transformers</h2>")
|
150 |
with gr.Row():
|
151 |
transformer_model_dropdown = gr.Dropdown(
|
152 |
label="Select Transformers Model",
|
|
|
154 |
value="TinyLlama/TinyLlama_v1.1",
|
155 |
interactive=True
|
156 |
)
|
157 |
+
input_text_tr = gr.Textbox(label="Input Text", placeholder="Enter your input text here...", value="Who is Zeus?")
|
158 |
with gr.Row():
|
159 |
compare_button = gr.Button("Run Transformers Inference")
|
160 |
transformer_result_output = gr.Textbox(label="Transformers Output", interactive=False, placeholder="Transformers output will appear here...")
|