Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
I'll create a comprehensive text-to-video and image-to-video application using the Hugging Face Inference Client with fal-ai provider.
|
| 2 |
-
|
| 3 |
-
```python
|
| 4 |
import gradio as gr
|
| 5 |
import os
|
| 6 |
from huggingface_hub import InferenceClient
|
|
@@ -323,42 +320,4 @@ if __name__ == "__main__":
|
|
| 323 |
show_api=True,
|
| 324 |
share=False,
|
| 325 |
show_error=True
|
| 326 |
-
)
|
| 327 |
-
```
|
| 328 |
-
|
| 329 |
-
This application provides:
|
| 330 |
-
|
| 331 |
-
## Features:
|
| 332 |
-
|
| 333 |
-
1. **Text-to-Video Generation**:
|
| 334 |
-
- Convert text descriptions into videos
|
| 335 |
-
- Customizable duration, aspect ratio, and resolution
|
| 336 |
-
- Example prompts for inspiration
|
| 337 |
-
- Status updates and error handling
|
| 338 |
-
|
| 339 |
-
2. **Image-to-Video Animation**:
|
| 340 |
-
- Upload static images and add motion
|
| 341 |
-
- Describe the desired animation with text prompts
|
| 342 |
-
- Same customization options as text-to-video
|
| 343 |
-
- Example motion descriptions
|
| 344 |
-
|
| 345 |
-
3. **User-Friendly Interface**:
|
| 346 |
-
- Clean, tabbed interface separating the two functions
|
| 347 |
-
- Advanced settings in collapsible accordions
|
| 348 |
-
- Real-time status updates
|
| 349 |
-
- Download capability for generated videos
|
| 350 |
-
- Clear buttons to reset inputs
|
| 351 |
-
|
| 352 |
-
4. **Professional Design**:
|
| 353 |
-
- Soft theme for pleasant viewing
|
| 354 |
-
- Responsive layout
|
| 355 |
-
- Proper error handling and user feedback
|
| 356 |
-
- "Built with anycoder" attribution link in header
|
| 357 |
-
|
| 358 |
-
5. **Additional Features**:
|
| 359 |
-
- Auto-play for generated videos
|
| 360 |
-
- Example inputs to help users get started
|
| 361 |
-
- How-to-use guide
|
| 362 |
-
- Progress indicators during generation
|
| 363 |
-
|
| 364 |
-
The app handles both text-to-video and image-to-video generation using the VEO 3.1 Fast models through the Hugging Face Inference Client with fal-ai provider. It includes proper error handling, user feedback, and a clean interface that makes it easy for users to generate AI videos.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
from huggingface_hub import InferenceClient
|
|
|
|
| 320 |
show_api=True,
|
| 321 |
share=False,
|
| 322 |
show_error=True
|
| 323 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|