Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,26 +1,3 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
# First prompt to be used before anything else
|
5 |
-
system_prompt = "You are a helpful assistant. Please process the user's input after this message."
|
6 |
-
|
7 |
-
# Combine system prompt with user input
|
8 |
-
prompt = f"{system_prompt} User's input: {input_text}"
|
9 |
-
|
10 |
-
# Call your model with the combined prompt
|
11 |
-
response = your_model_function(prompt) # Replace this with actual model call
|
12 |
-
return response
|
13 |
-
|
14 |
-
with gr.Blocks() as interface:
|
15 |
-
# Define the inputs and outputs for the interface
|
16 |
-
input_text = gr.Textbox()
|
17 |
-
output_text = gr.Textbox()
|
18 |
-
|
19 |
-
# Set up the function to be called when the user submits input
|
20 |
-
input_text.submit(custom_model_input, inputs=input_text, outputs=output_text)
|
21 |
-
|
22 |
-
# Load the model when the interface is initialized
|
23 |
-
interface.load("models/Qwen/QwQ-32B-Preview")
|
24 |
-
|
25 |
-
# Start the interface
|
26 |
-
interface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.load("models/Qwen/QwQ-32B-Preview").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|