Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- fewshot_matplot.txt +19 -0
- fewshot_plot.txt +9 -0
fewshot_matplot.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Plot a bar graph or line graph based on requirement and which ever best fits for the use case
|
2 |
+
using st.pyplot(fig), matplotlib.pyplot and streamlit and numpy if needed.
|
3 |
+
Use the below example code as reference:
|
4 |
+
|
5 |
+
Request: How many cars were produced each year from 2000 to 2004?
|
6 |
+
|
7 |
+
Plot graph for:
|
8 |
+
import streamlit as st
|
9 |
+
import matplotlib.pyplot as plt
|
10 |
+
import numpy as np
|
11 |
+
|
12 |
+
arr = np.random.normal(1, 1, size=100)
|
13 |
+
fig, ax = plt.subplots()
|
14 |
+
ax.hist(arr, bins=20)
|
15 |
+
|
16 |
+
st.pyplot(fig)
|
17 |
+
|
18 |
+
Request:
|
19 |
+
|
fewshot_plot.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Plot a line chart using streamlit st.line_chart() from instructions for the information:
|
2 |
+
|
3 |
+
Request: How many cars were produced each year from 2000 to 2004?
|
4 |
+
Plot graph for: st.bar_chart(pd.DataFrame({"year_produced": [2000, 2001, 2002, 2003, 2004], "num_cars": [1672, 1845, 1688, 1485, 1358]}))
|
5 |
+
|
6 |
+
Request: How many cars were produced of each color in the year 2004?
|
7 |
+
Plot graph for: st.bar_chart(pd.DataFrame({"color": ['silver','black','blue','white','green','red','grey','orange','other'], "num": [8,4,6,3,2,1,4,1,9]}))
|
8 |
+
|
9 |
+
Request:
|