Spaces:
Running
on
A10G
Running
on
A10G
MekkCyber
commited on
Commit
·
f08c0c5
1
Parent(s):
9be6f61
update
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def hello(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) ->
|
|
| 14 |
# if the user is not logged in, profile will be None
|
| 15 |
if profile is None:
|
| 16 |
return "Hello !"
|
| 17 |
-
return f"Hello {profile.name} !"
|
| 18 |
|
| 19 |
def check_model_exists(oauth_token: gr.OAuthToken | None, username, quantization_type, model_name, quantized_model_name):
|
| 20 |
"""Check if a model exists in the user's Hugging Face repository."""
|
|
@@ -136,6 +136,9 @@ def quantize_and_save(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToke
|
|
| 136 |
|
| 137 |
css="""/* Custom CSS to allow scrolling */
|
| 138 |
.gradio-container {overflow-y: auto;}
|
|
|
|
|
|
|
|
|
|
| 139 |
"""
|
| 140 |
with gr.Blocks(theme=gr.themes.Ocean(), css=css) as demo:
|
| 141 |
gr.Markdown(
|
|
@@ -219,7 +222,7 @@ with gr.Blocks(theme=gr.themes.Ocean(), css=css) as demo:
|
|
| 219 |
visible=False,
|
| 220 |
show_label=False
|
| 221 |
)
|
| 222 |
-
radio_4 = gr.Radio(["False", "True"], label="Use Double Quant", visible=False, value="False")
|
| 223 |
|
| 224 |
def update_visibility(quantization_type):
|
| 225 |
return gr.update(visible=(quantization_type=="int8")), gr.update(visible=(quantization_type=="int4")), gr.update(visible=(quantization_type=="int4"))
|
|
|
|
| 14 |
# if the user is not logged in, profile will be None
|
| 15 |
if profile is None:
|
| 16 |
return "Hello !"
|
| 17 |
+
return f"Hello {profile.name} ! Welcome to BitsAndBytes Space"
|
| 18 |
|
| 19 |
def check_model_exists(oauth_token: gr.OAuthToken | None, username, quantization_type, model_name, quantized_model_name):
|
| 20 |
"""Check if a model exists in the user's Hugging Face repository."""
|
|
|
|
| 136 |
|
| 137 |
css="""/* Custom CSS to allow scrolling */
|
| 138 |
.gradio-container {overflow-y: auto;}
|
| 139 |
+
.custom-radio {
|
| 140 |
+
margin-left: 20px; /* Adjust the value as needed */
|
| 141 |
+
}
|
| 142 |
"""
|
| 143 |
with gr.Blocks(theme=gr.themes.Ocean(), css=css) as demo:
|
| 144 |
gr.Markdown(
|
|
|
|
| 222 |
visible=False,
|
| 223 |
show_label=False
|
| 224 |
)
|
| 225 |
+
radio_4 = gr.Radio(["False", "True"], label="Use Double Quant", visible=False, value="False", elem_classes="custom_radio")
|
| 226 |
|
| 227 |
def update_visibility(quantization_type):
|
| 228 |
return gr.update(visible=(quantization_type=="int8")), gr.update(visible=(quantization_type=="int4")), gr.update(visible=(quantization_type=="int4"))
|