Spaces:
Sleeping
Sleeping
kurniawan
commited on
Commit
·
02e7c0e
0
Parent(s):
Initial commit: Simple Streamlit app
Browse files- README.md +14 -0
- app.py +11 -0
- requirements.txt +1 -0
README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Simple Input Output App
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.28.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Simple Input/Output Streamlit App
|
| 13 |
+
|
| 14 |
+
A simple Streamlit application that takes text input and displays output with character and word count.
|
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
st.title("Simple Input/Output App")
|
| 4 |
+
|
| 5 |
+
user_input = st.text_input("Enter your text:", placeholder="Type something here...")
|
| 6 |
+
|
| 7 |
+
if user_input:
|
| 8 |
+
st.write("### Output:")
|
| 9 |
+
st.write(f"You entered: **{user_input}**")
|
| 10 |
+
st.write(f"Character count: {len(user_input)}")
|
| 11 |
+
st.write(f"Word count: {len(user_input.split())}")
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
streamlit==1.28.0
|