Spaces:
No application file
No application file
import gradio as gr | |
from web_scraper import search_your_product | |
def product_search(query: str) -> str: | |
""" | |
Search for products based on the provided query. | |
Args: | |
query (str): The search query for products. | |
Returns: | |
str: A message with the search results. | |
""" | |
results = search_your_product(query) | |
if not results: | |
return f"No products found for your search: '{query}'. Please try a different query." | |
return f"Here are the products matching your search for '{query}': {results}." | |
demo = gr.Interface(fn=product_search, | |
inputs=[], | |
outputs="number") | |
demo.launch(mcp_server=True) # exposes an MCP schema automatically |