Upload folder using huggingface_hub
Browse filesFiles changed (5)
- README.md+7-7
- data.pyAdded+10
- requirements.txtAdded+2
- run.ipynbAdded+1
- run.pyAdded+8
123456789101112---title: Plot Guide Series Nominal Mainemoji: 🏆colorFrom: yellowcolorTo: redsdk: gradiosdk_version: 4.39.0app_file: app.pypinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: plot_guide_series_nominal_mainemoji: 🔥colorFrom: indigocolorTo: indigosdk: gradiosdk_version: 4.39.0app_file: run.pypinned: falsehf_oauth: true---
12345678910import pandas as pdimport numpy as npimport random
df = pd.DataFrame({ 'height': np.random.randint(50, 70, 25), 'weight': np.random.randint(120, 320, 25), 'age': np.random.randint(18, 65, 25), 'ethnicity': [random.choice(["white", "black", "asian"]) for _ in range(25)]})12gradio-client @ git+https://github.com/gradio-app/gradio@9b42ba8f1006c05d60a62450d3036ce0d6784f86#subdirectory=client/pythonhttps://gradio-builds.s3.amazonaws.com/9b42ba8f1006c05d60a62450d3036ce0d6784f86/gradio-4.39.0-py3-none-any.whl1{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: plot_guide_series_nominal"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/plot_guide_series_nominal/data.py"]}, {"cell_type": "code", "execution_count": null, "id": "44380577570523278879349135829904343037", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "from data import df\n", "\n", "with gr.Blocks() as demo:\n", " gr.ScatterPlot(df, x=\"weight\", y=\"height\", color=\"ethnicity\")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}12345678import gradio as grfrom data import df
with gr.Blocks() as demo: gr.ScatterPlot(df, x="weight", y="height", color="ethnicity")
if __name__ == "__main__": demo.launch()README.md+7-7
data.pyAdded+10
requirements.txtAdded+2
run.ipynbAdded+1
run.pyAdded+8