Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- README.md +7 -7
- requirements.txt +3 -0
- streamlit_app.py +14 -0
README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
---
|
2 |
title: FastAPI
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: streamlit
|
7 |
-
sdk_version: 1.
|
8 |
-
app_file:
|
9 |
pinned: false
|
10 |
---
|
11 |
-
|
12 |
-
|
|
|
1 |
---
|
2 |
title: FastAPI
|
3 |
+
emoji: π
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
sdk: streamlit
|
7 |
+
sdk_version: "1.10.0"
|
8 |
+
app_file: streamlit_app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
+
# FastAPI
|
12 |
+
This is a Streamlit app generated and deployed automatically.
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
streamlit
|
2 |
+
altair==4.2.0
|
3 |
+
vega_datasets
|
streamlit_app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
```python
|
2 |
+
import streamlit as st
|
3 |
+
import requests
|
4 |
+
|
5 |
+
st.title("Current Timing Fast API")
|
6 |
+
|
7 |
+
response = requests.get("http://worldclockapi.com/api/json/utc/now")
|
8 |
+
|
9 |
+
if response.status_code == 200:
|
10 |
+
current_time = response.json()["currentDateTime"]
|
11 |
+
st.write(f"The current timing is: {current_time}")
|
12 |
+
else:
|
13 |
+
st.write("Error: Unable to retrieve current timing")
|
14 |
+
```
|