Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| cv_spaces = [ | |
| { | |
| "title": "ComVis Object Detection", | |
| "link": "https://huggingface.co/spaces/chanakarnuac/G01_Computer_Vision_Yolov10", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/1%20Object%20Detection.png" | |
| }, | |
| { | |
| "title": "ComVis Image Classification", | |
| "link": "https://huggingface.co/spaces/Nusss/clothing", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/2%20Cloth%20Type%20.png" | |
| }, | |
| { | |
| "title": "ComVis Mask Generation + Image Generation", | |
| "link": "https://huggingface.co/spaces/hellofocus/remove-photo-background", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/3%20Background%20Remover.png" | |
| } | |
| ] | |
| nlp_spaces = [ | |
| { | |
| "title": "NLP Text Generation", | |
| "link": "https://huggingface.co/spaces/Nusss/google-gemma-2-2b-it", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/4%20Text%20Generation.png" | |
| }, | |
| { | |
| "title": "NLP Text Summarization", | |
| "link": "https://huggingface.co/spaces/chanakarnuac/G01_NLP_Ai-business-insights", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/5%20Company%20Workflow%20Insights.png" | |
| }, | |
| { | |
| "title": "Text Summarization + Text Generation", | |
| "link": "https://huggingface.co/spaces/theerasin/ChatWithPDF", | |
| "img": "https://huggingface.co/spaces/theerasin/IS361Final/resolve/main/image/6%20Chat%20With%20PDF.png" | |
| }, | |
| ] | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# Hugging Face Spaces For IS361 FinalProject\n**คลิกที่ปุ่มเพื่อเปิดแต่ละโปรเจกต์ในแท็บใหม่**") | |
| gr.Markdown("## หมวด Computer Vision") | |
| for space in cv_spaces: | |
| with gr.Row(): | |
| gr.Image(space["img"], width=100, show_label=False) | |
| gr.Button(f"เปิด {space['title']}", link=space["link"]) | |
| gr.Markdown("## หมวด NLP (Natural Language Processing)") | |
| for space in nlp_spaces: | |
| with gr.Row(): | |
| gr.Image(space["img"], width=100, show_label=False) | |
| gr.Button(f"เปิด {space['title']}", link=space["link"]) | |
| demo.launch() |