Spaces:
Running
Running
aashish1904
commited on
Commit
•
4f33950
1
Parent(s):
fcbd77b
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,7 @@ def submit_link(link):
|
|
59 |
quant_exists, quant_link = check_quant_factory_quant_exists(link)
|
60 |
if quant_exists:
|
61 |
model_name = link.split('/')[-1] # Extract the model name
|
|
|
62 |
return f"Quant already exists at [QuantFactory/{model_name}-GGUF]({quant_link})."
|
63 |
|
64 |
# Check if the quant request already exists in the Google Sheet
|
@@ -81,7 +82,6 @@ def submit_link(link):
|
|
81 |
|
82 |
return "Request submitted successfully."
|
83 |
|
84 |
-
|
85 |
# Gradio Interface
|
86 |
with gr.Blocks() as demo:
|
87 |
with gr.Row():
|
@@ -89,7 +89,7 @@ with gr.Blocks() as demo:
|
|
89 |
gr.Markdown("## QuantFactory - Model Request")
|
90 |
link_input = gr.Textbox(label="Hugging Face Link")
|
91 |
submit_button = gr.Button("Submit")
|
92 |
-
result = gr.
|
93 |
submit_button.click(fn=submit_link, inputs=link_input, outputs=result)
|
94 |
with gr.Column(scale=1): # Right column
|
95 |
gr.Image("image.png") # Display the image on the right
|
|
|
59 |
quant_exists, quant_link = check_quant_factory_quant_exists(link)
|
60 |
if quant_exists:
|
61 |
model_name = link.split('/')[-1] # Extract the model name
|
62 |
+
# Return a formatted Markdown string to create a clickable hyperlink
|
63 |
return f"Quant already exists at [QuantFactory/{model_name}-GGUF]({quant_link})."
|
64 |
|
65 |
# Check if the quant request already exists in the Google Sheet
|
|
|
82 |
|
83 |
return "Request submitted successfully."
|
84 |
|
|
|
85 |
# Gradio Interface
|
86 |
with gr.Blocks() as demo:
|
87 |
with gr.Row():
|
|
|
89 |
gr.Markdown("## QuantFactory - Model Request")
|
90 |
link_input = gr.Textbox(label="Hugging Face Link")
|
91 |
submit_button = gr.Button("Submit")
|
92 |
+
result = gr.Markdown() # Use Markdown to render the output as a clickable hyperlink
|
93 |
submit_button.click(fn=submit_link, inputs=link_input, outputs=result)
|
94 |
with gr.Column(scale=1): # Right column
|
95 |
gr.Image("image.png") # Display the image on the right
|