Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- README.md +32 -6
- app.py +66 -0
- requirements.txt +6 -0
README.md
CHANGED
@@ -1,14 +1,40 @@
|
|
1 |
---
|
2 |
title: Fast File Downloader
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
license: apache-2.0
|
11 |
-
short_description: fast file downloader
|
12 |
---
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: Fast File Downloader
|
3 |
+
emoji: 🚀
|
4 |
+
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.7.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
|
|
10 |
---
|
11 |
|
12 |
+
# Fast File Downloader 🚀
|
13 |
+
|
14 |
+
This is a Streamlit-based web application that helps you download files and videos at maximum speed.
|
15 |
+
|
16 |
+
## Features
|
17 |
+
|
18 |
+
- Fast download of large files
|
19 |
+
- Support for downloading YouTube videos
|
20 |
+
- Support for direct download links
|
21 |
+
- Display download speed and progress directly
|
22 |
+
- Easy-to-use interface
|
23 |
+
|
24 |
+
## Usage
|
25 |
+
|
26 |
+
1. Enter the file or video link in the text box
|
27 |
+
2. Click the "Start Download" button
|
28 |
+
3. Wait until the download is complete
|
29 |
+
4. Download the file through the link that will appear
|
30 |
+
|
31 |
+
## Support
|
32 |
+
|
33 |
+
- YouTube and web videos
|
34 |
+
- Direct download links
|
35 |
+
- Large files
|
36 |
+
|
37 |
+
## Notes
|
38 |
+
|
39 |
+
- Download speed depends on your internet speed
|
40 |
+
- Some sites may limit the download speed
|
app.py
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# تهيئة النموذج
|
5 |
+
rewriter = pipeline(
|
6 |
+
"text2text-generation",
|
7 |
+
model="facebook/bart-large-cnn",
|
8 |
+
device=-1 # استخدام CPU
|
9 |
+
)
|
10 |
+
|
11 |
+
def rewrite_article(text):
|
12 |
+
"""
|
13 |
+
دالة لإعادة صياغة النص المدخل
|
14 |
+
"""
|
15 |
+
# التحقق من أن النص غير فارغ
|
16 |
+
if not text.strip():
|
17 |
+
return "الرجاء إدخال نص لإعادة صياغته"
|
18 |
+
|
19 |
+
try:
|
20 |
+
# تقسيم النص إذا كان طويلاً
|
21 |
+
max_chunk_length = 512
|
22 |
+
chunks = [text[i:i + max_chunk_length] for i in range(0, len(text), max_chunk_length)]
|
23 |
+
rewritten_chunks = []
|
24 |
+
|
25 |
+
for chunk in chunks:
|
26 |
+
# إعادة صياغة الجزء
|
27 |
+
result = rewriter(
|
28 |
+
chunk,
|
29 |
+
max_length=512,
|
30 |
+
min_length=30,
|
31 |
+
num_beams=4,
|
32 |
+
length_penalty=2.0,
|
33 |
+
no_repeat_ngram_size=3,
|
34 |
+
do_sample=True,
|
35 |
+
temperature=0.7
|
36 |
+
)[0]['generated_text']
|
37 |
+
rewritten_chunks.append(result)
|
38 |
+
|
39 |
+
# دمج جميع الأجزاء
|
40 |
+
final_text = " ".join(rewritten_chunks)
|
41 |
+
return final_text
|
42 |
+
|
43 |
+
except Exception as e:
|
44 |
+
return f"حدث خطأ: {str(e)}"
|
45 |
+
|
46 |
+
# إنشاء واجهة المستخدم
|
47 |
+
iface = gr.Interface(
|
48 |
+
fn=rewrite_article,
|
49 |
+
inputs=gr.Textbox(
|
50 |
+
lines=10,
|
51 |
+
placeholder="أدخل النص الذي تريد إعادة صياغته هنا...",
|
52 |
+
label="النص الأصلي"
|
53 |
+
),
|
54 |
+
outputs=gr.Textbox(
|
55 |
+
lines=10,
|
56 |
+
label="النص المعاد صياغته"
|
57 |
+
),
|
58 |
+
title="أداة إعادة صياغة المقالات",
|
59 |
+
description="قم بإدخال النص الذي تريد إعادة صياغته وسيقوم النموذج بإعادة كتابته بأسلوب جديد",
|
60 |
+
examples=[
|
61 |
+
["هذا النص تجريبي لاختبار أداة إعادة الصياغة. يمكنك تجربة النص الخاص بك."],
|
62 |
+
]
|
63 |
+
)
|
64 |
+
|
65 |
+
# تشغيل التطبيق
|
66 |
+
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
gradio>=4.7.1
|
2 |
+
yt-dlp>=2023.12.30
|
3 |
+
requests>=2.31.0
|
4 |
+
pytube>=15.0.0
|
5 |
+
aiohttp>=3.9.1
|
6 |
+
tqdm>=4.66.1
|