Spaces:
Sleeping
Sleeping
fvancesco
commited on
Commit
·
5f81c24
1
Parent(s):
74240fd
first commit
Browse files- app.py +23 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
import seaborn as sns
|
4 |
+
import matplotlib.pyplot as plt
|
5 |
+
|
6 |
+
|
7 |
+
def plot_pens(alpha):
|
8 |
+
df_pens = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/penguins.csv')
|
9 |
+
fig = plt.figure()
|
10 |
+
plt.scatter(x=df_pens['bill_length_mm'], y=df_pens['bill_depth_mm'])
|
11 |
+
return fig
|
12 |
+
|
13 |
+
|
14 |
+
iface = gr.Interface(
|
15 |
+
fn=plot_pens,
|
16 |
+
layout='vertical',
|
17 |
+
inputs=['checkbox'],
|
18 |
+
outputs=['plot'],
|
19 |
+
title="Scatterplot of Palmer Penguins",
|
20 |
+
description="Let's talk pens.",
|
21 |
+
article="Talk more about Penguins here, shall we?",
|
22 |
+
theme='peach'
|
23 |
+
).launch()
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
transformers
|