from llama_cpp import Llama import gradio as gr # Load the model llm = Llama(model_path="mistral-7b-instruct-v0.1.Q4_K_M.gguf", n_ctx=2048) def generate_description(business_name): prompt = f"""[INST] Write a commercial and SEO-optimized Google My Business description for a business called "{business_name}". Highlight its services, quality, and trust. Keep it under 250 characters. [/INST]""" output = llm(prompt, max_tokens=200, temperature=0.7, stop=[""]) return output['choices'][0]['text'].strip() gr.Interface( fn=generate_description, inputs=gr.Textbox(label="Business Name", placeholder="e.g. Pizza House"), outputs="text", title="GMB Description Generator (Mistral)", description="Generate SEO-optimized business descriptions using Mistral-7B-GGUF." ).launch()