Spaces:
Sleeping
Sleeping
updates
Browse files
app.py
CHANGED
@@ -1,7 +1,20 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
-
return "Hello " + name + "!!"
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from datasets import load_dataset
|
3 |
+
|
4 |
+
# Load the dataset and convert it to a Pandas dataframe
|
5 |
+
sotu_dataset = 'jsulz/state-of-the-union-addresses'
|
6 |
+
dataset = load_dataset(sotu_dataset)
|
7 |
+
df = dataset['train'].to_pandas()
|
8 |
+
|
9 |
+
print(df.head(10))
|
10 |
|
11 |
def greet(name):
|
12 |
+
return "Hello " + name + ", you're cool!!"
|
13 |
+
|
14 |
+
# Create a Gradio interface with blocks
|
15 |
+
with gr.Blocks() as demo:
|
16 |
+
with gr.Row():
|
17 |
+
gr.Markdown("# A Dashboard to Analyze the State of the Union Addresses")
|
18 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
19 |
|
|
|
20 |
demo.launch()
|