Spaces:
Runtime error
Runtime error
Download app.py from Mustafaansari/Hollywood-Movie-Recommendation-System: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/Mustafaansari/Hollywood-Movie-Recommendation-System/resolve/main/app.py
- Command line
-
hf download hf://spaces/Mustafaansari/Hollywood-Movie-Recommendation-System/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Mustafaansari/Hollywood-Movie-Recommendation-System/resolve/main/app.py
737 Bytes
| import modelbit | |
| import pandas as pd | |
| import gradio as gr | |
| def recommend(movie_name): | |
| response_json = modelbit.get_inference( | |
| region="ap-south-1", | |
| workspace="mustafaansari", | |
| deployment="recommend", | |
| data=movie_name | |
| ) | |
| data_list = response_json['data'] | |
| df = pd.DataFrame(data_list) | |
| return df | |
| # Add an example for the UI | |
| examples = [ | |
| ["The Dark Knight"], | |
| ["Inception"], | |
| ["Interstellar"] | |
| ] | |
| gr.Interface(fn=recommend, inputs="text", outputs=gr.DataFrame(), title="Hollywood Movie Recommendation System", | |
| description="Enter a Hollywood movie name, and this system will recommend similar movies based on your input.", | |
| examples=examples # Add examples to the UI | |
| ).launch() | |