TenPoisk commited on
Commit
6882b9f
1 Parent(s): a561452

Upload 4 files

Browse files
Files changed (4) hide show
  1. README (1).md +13 -0
  2. gitattributes (1).txt +35 -0
  3. index.html +49 -0
  4. style.css +28 -0
README (1).md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: URLcut — link shortener
3
+ emoji: 🔗☕🔗
4
+ colorFrom: indigo
5
+ colorTo: green
6
+ sdk: static
7
+ pinned: false
8
+ URLcut: bit.ly
9
+ ---
10
+
11
+ 🔗 This tool will help you shorten links on bit.ly domain for free and unlimited!
12
+
13
+ 🔗 Этот инструмент поможет вам бесплатно и безлимитно сокращать ссылки на домене bit.ly!
gitattributes (1).txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
index.html ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>CofURL.cut</title>
5
+ <p></p>
6
+ </head>
7
+ <body>
8
+ <h1>CofURLcut</h1>
9
+ <label for="long-url">Enter a long link:</label>
10
+ <p></p>
11
+ <input type="text" id="long-url" placeholder="https://cofai-urlcut.hf.space">
12
+ <p></p>
13
+ <button id="shorten-button">Shorten</button>
14
+ <br>
15
+ <p></p>
16
+ <label for="short-url">Short link:</label>
17
+ <p></p>
18
+ <input type="text" id="short-url" readonly>
19
+ <p></p>
20
+ <script>
21
+ document.getElementById("shorten-button").addEventListener("click", function() {
22
+ var longUrl = document.getElementById("long-url").value;
23
+
24
+ // Выполнение запроса к API Bit.ly для сокращения ссылки
25
+ fetch("https://api-ssl.bitly.com/v4/shorten", {
26
+ method: "POST",
27
+ headers: {
28
+ "Content-Type": "application/json",
29
+ "Authorization": "326c6f40970f20b2e71669323f7849575789630b"
30
+ },
31
+ body: JSON.stringify({
32
+ long_url: longUrl
33
+ })
34
+ })
35
+ .then(response => response.json())
36
+ .then(data => {
37
+ var shortUrl = data.link;
38
+ document.getElementById("short-url").value = shortUrl;
39
+ })
40
+ .catch(error => {
41
+ console.error(error);
42
+ document.getElementById("short-url").value = "Ошибка при сокращении ссылки.";
43
+ });
44
+ });
45
+ </script>
46
+ <p></p>
47
+ Link shortener by CofAI
48
+ </body>
49
+ </html>
style.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ padding: 2rem;
3
+ font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
+ }
5
+
6
+ h1 {
7
+ font-size: 16px;
8
+ margin-top: 0;
9
+ }
10
+
11
+ p {
12
+ color: rgb(107, 114, 128);
13
+ font-size: 15px;
14
+ margin-bottom: 10px;
15
+ margin-top: 5px;
16
+ }
17
+
18
+ .card {
19
+ max-width: 620px;
20
+ margin: 0 auto;
21
+ padding: 16px;
22
+ border: 1px solid lightgray;
23
+ border-radius: 16px;
24
+ }
25
+
26
+ .card p:last-child {
27
+ margin-bottom: 0;
28
+ }