Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,38 @@ prompt = 'Plot the histogram of countries showing for each the gdp, using differ
|
|
35 |
response = pandas_ai.run(df, prompt=prompt,
|
36 |
is_conversational_answer=False)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
with gr.Blocks(title=title) as demo:
|
39 |
gr.Markdown('''
|
40 |
<div>
|
@@ -45,5 +77,5 @@ with gr.Blocks(title=title) as demo:
|
|
45 |
|
46 |
button.click(plot_chey, outputs = gr.Plot())
|
47 |
demo.launch()
|
48 |
-
|
49 |
|
|
|
35 |
response = pandas_ai.run(df, prompt=prompt,
|
36 |
is_conversational_answer=False)
|
37 |
|
38 |
+
|
39 |
+
with gr.Blocks(title = heading, theme= 'snehilsanyal/scikit-learn') as demo:
|
40 |
+
gr.Markdown("# {}".format(heading))
|
41 |
+
gr.Markdown(
|
42 |
+
"""
|
43 |
+
### This demo visualizes different SVM Classifiers on a 2D projection of the Iris dataset.
|
44 |
+
|
45 |
+
<b>The features to be considered are:</b>\
|
46 |
+
\
|
47 |
+
|
48 |
+
1. Sepal length (cm) \
|
49 |
+
|
50 |
+
2. Sepal width (cm) \
|
51 |
+
|
52 |
+
<b>The SVM Classifiers used for this demo are:</b>\
|
53 |
+
\
|
54 |
+
1. SVC with linear kernel \
|
55 |
+
|
56 |
+
2. Linear SVC \
|
57 |
+
|
58 |
+
3. SVC with RBF kernel\
|
59 |
+
|
60 |
+
4. SVC with Polynomial (degree 3) kernel
|
61 |
+
"""
|
62 |
+
)
|
63 |
+
gr.Markdown('**[Demo is based on this script from scikit-learn documentation](https://scikit-learn.org/stable/auto_examples/svm/plot_iris_svc.html#sphx-glr-auto-examples-svm-plot-iris-svc-py)**')
|
64 |
+
button = gr.Button(value = 'Visualize different SVM Classifiers on Iris Dataset')
|
65 |
+
button.click(plot_chey, outputs = gr.Plot())
|
66 |
+
|
67 |
+
demo.launch()
|
68 |
+
'''
|
69 |
+
|
70 |
with gr.Blocks(title=title) as demo:
|
71 |
gr.Markdown('''
|
72 |
<div>
|
|
|
77 |
|
78 |
button.click(plot_chey, outputs = gr.Plot())
|
79 |
demo.launch()
|
80 |
+
'''
|
81 |
|