Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,21 +1,24 @@
|
|
1 |
import gradio as gr
|
2 |
-
import transformers_gradio
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
#
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Define the optional parameters section
|
14 |
def create_optional_parameters():
|
15 |
with gr.Accordion("Optional Parameters (Click to Expand)", open=False):
|
16 |
system_message = gr.Textbox(
|
17 |
label="System Message",
|
18 |
-
value="You are a friendly Chatbot created by
|
19 |
lines=2
|
20 |
)
|
21 |
max_new_tokens = gr.Slider(minimum=1, maximum=4000, value=200, label="Max New Tokens")
|
@@ -59,4 +62,4 @@ with gr.Blocks() as demo:
|
|
59 |
|
60 |
# Launch the demo
|
61 |
if __name__ == "__main__":
|
62 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
+
# Placeholder for model loading (adjust as needed for your specific models)
|
4 |
+
def load_model(model_name):
|
5 |
+
# Replace this function with actual model loading code if needed
|
6 |
+
return lambda input_text: f"Response from {model_name}: {input_text}"
|
7 |
|
8 |
+
# Load the models (placeholder functions here)
|
9 |
+
deepseek_r1_distill = load_model("DeepSeek-R1-Distill-Qwen-32B")
|
10 |
+
deepseek_r1 = load_model("DeepSeek-R1")
|
11 |
+
deepseek_r1_zero = load_model("DeepSeek-R1-Zero")
|
12 |
+
|
13 |
+
# Disable API names for all functions (Gradio doesn't natively use `fns`)
|
14 |
+
# Adjust this section if specific API name disabling logic is required.
|
15 |
|
16 |
# Define the optional parameters section
|
17 |
def create_optional_parameters():
|
18 |
with gr.Accordion("Optional Parameters (Click to Expand)", open=False):
|
19 |
system_message = gr.Textbox(
|
20 |
label="System Message",
|
21 |
+
value="You are a friendly Chatbot created by ruslanmv.com",
|
22 |
lines=2
|
23 |
)
|
24 |
max_new_tokens = gr.Slider(minimum=1, maximum=4000, value=200, label="Max New Tokens")
|
|
|
62 |
|
63 |
# Launch the demo
|
64 |
if __name__ == "__main__":
|
65 |
+
demo.launch()
|