Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -5,7 +5,7 @@ emoji: 🔥
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
-
sdk_version: 4.
|
9 |
app_file: run.py
|
10 |
pinned: false
|
11 |
hf_oauth: true
|
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
+
sdk_version: 4.36.0
|
9 |
app_file: run.py
|
10 |
pinned: false
|
11 |
hf_oauth: true
|
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
gradio-client @ git+https://github.com/gradio-app/gradio@
|
2 |
-
https://gradio-builds.s3.amazonaws.com/
|
|
|
1 |
+
gradio-client @ git+https://github.com/gradio-app/gradio@a2cd8a9838864596318a686510f15e7998a27880#subdirectory=client/python
|
2 |
+
https://gradio-builds.s3.amazonaws.com/a2cd8a9838864596318a686510f15e7998a27880/gradio-4.36.0-py3-none-any.whl
|
run.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: dataframe_colorful"]}, {"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": ["import pandas as pd
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: dataframe_colorful"]}, {"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": ["import pandas as pd\n", "import gradio as gr\n", "\n", "df = pd.DataFrame(\n", " {\n", " \"A\": [14, 4, 5, 4, 1],\n", " \"B\": [5, 2, 54, 3, 2],\n", " \"C\": [20, 20, 7, 3, 8],\n", " \"D\": [14, 3, 6, 2, 6],\n", " \"E\": [23, 45, 64, 32, 23],\n", " }\n", ")\n", "\n", "t = df.style.highlight_max(color=\"lightgreen\", axis=0)\n", "\n", "with gr.Blocks() as demo:\n", " gr.Dataframe(t)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
@@ -1,16 +1,20 @@
|
|
1 |
-
import pandas as pd
|
2 |
import gradio as gr
|
3 |
|
4 |
-
df = pd.DataFrame(
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
t = df.style.highlight_max(color
|
11 |
|
12 |
with gr.Blocks() as demo:
|
13 |
gr.Dataframe(t)
|
14 |
-
|
15 |
if __name__ == "__main__":
|
16 |
-
demo.launch()
|
|
|
1 |
+
import pandas as pd
|
2 |
import gradio as gr
|
3 |
|
4 |
+
df = pd.DataFrame(
|
5 |
+
{
|
6 |
+
"A": [14, 4, 5, 4, 1],
|
7 |
+
"B": [5, 2, 54, 3, 2],
|
8 |
+
"C": [20, 20, 7, 3, 8],
|
9 |
+
"D": [14, 3, 6, 2, 6],
|
10 |
+
"E": [23, 45, 64, 32, 23],
|
11 |
+
}
|
12 |
+
)
|
13 |
|
14 |
+
t = df.style.highlight_max(color="lightgreen", axis=0)
|
15 |
|
16 |
with gr.Blocks() as demo:
|
17 |
gr.Dataframe(t)
|
18 |
+
|
19 |
if __name__ == "__main__":
|
20 |
+
demo.launch()
|