import gradio as gr def custom_model_input(input_text): # First prompt to be used before anything else system_prompt = "You are a helpful assistant. Please process the user's input after this message." # Combine system prompt with user input prompt = f"{system_prompt} User's input: {input_text}" # Call your model with the combined prompt response = your_model_function(prompt) # Replace this with actual model call return response with gr.Blocks() as interface: # Define the inputs and outputs for the interface input_text = gr.Textbox() output_text = gr.Textbox() # Set up the function to be called when the user submits input input_text.submit(custom_model_input, inputs=input_text, outputs=output_text) # Load the model when the interface is initialized interface.load("models/Qwen/QwQ-32B-Preview") # Start the interface interface.launch()