Skip to content

Commit f509b88

Browse files
authored
Se agregan los files
1 parent e0bac97 commit f509b88

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

imagen/www.png

13.9 KB
Loading

short_url.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import pyshorteners
2+
import streamlit as st
3+
4+
def shorten_url(url):
5+
s = pyshorteners.Shortener()
6+
shortened_url = s.tinyurl.short(url)
7+
return shortened_url
8+
9+
#creamos app web con stremamlit
10+
st.set_page_config(page_title="URL Shortener", page_icon="✏️", layout="centered")
11+
st.image("imagen/www.png", use_column_width=True)
12+
st.title("URL Shortener")
13+
url = st.text_input("Enter the URL")
14+
if st.button("Generate new URL"):
15+
st.write("URL shortened: ", shorten_url(url))

0 commit comments

Comments
 (0)