Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,31 +1,4 @@
|
|
1 |
-
"""Talk to spaces VM via subprocess.check_output."""
|
2 |
-
# pylint: disable=wrong-import-position
|
3 |
-
import sys
|
4 |
-
from pathlib import Path
|
5 |
-
if "." not in sys.path:
|
6 |
-
sys.path.insert(0, ".")
|
7 |
-
|
8 |
-
# import httpx
|
9 |
-
import subprocess as sp
|
10 |
-
from shlex import split
|
11 |
-
import pandas as pd
|
12 |
-
|
13 |
-
import matplotlib
|
14 |
-
import matplotlib.pyplot as plt
|
15 |
-
import seaborn as sns
|
16 |
-
|
17 |
-
# from textwrap import dedent
|
18 |
-
from inspect import cleandoc
|
19 |
import gradio as gr
|
20 |
-
import logzero
|
21 |
-
from logzero import logger
|
22 |
-
|
23 |
-
# from gradiobee.seg_text import seg_text
|
24 |
-
|
25 |
-
matplotlib.use("Agg") # non-interactive for plt.savefig
|
26 |
-
sns.set()
|
27 |
-
sns.set_style("darkgrid")
|
28 |
-
logzero.loglevel() # default to 10
|
29 |
|
30 |
def fn():
|
31 |
df = pd.DataFrame(data={'x': [1, 2], 'y': [3, 4], "cos": [0.1, 0.5]})
|
@@ -33,6 +6,7 @@ def fn():
|
|
33 |
|
34 |
iface = gr.Interface(
|
35 |
fn=fn,
|
|
|
36 |
outputs=["dataframe", "html"],
|
37 |
title="Test dataframe and html",
|
38 |
description="Test dataframe and html",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def fn():
|
4 |
df = pd.DataFrame(data={'x': [1, 2], 'y': [3, 4], "cos": [0.1, 0.5]})
|
|
|
6 |
|
7 |
iface = gr.Interface(
|
8 |
fn=fn,
|
9 |
+
"text",
|
10 |
outputs=["dataframe", "html"],
|
11 |
title="Test dataframe and html",
|
12 |
description="Test dataframe and html",
|