Spaces:
Sleeping
Sleeping
File size: 1,891 Bytes
3b58dfc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
import gradio as gr
import os
import sys
# Repository: https://github.com/liuff19/LangScene-X
# <div align="center">
# Note: This project requires CUDA-enabled GPU and complex build dependencies
# The original repository uses custom CUDA extensions that need compilation
def process_3d(input_file):
"""3D processing function - placeholder for actual implementation"""
if input_file is None:
return "Please upload a 3D file or image"
info = """
## ⚠️ Build Requirements Notice
This project requires:
1. CUDA-enabled GPU
2. Custom C++/CUDA extensions compilation
3. Specific versions of PyTorch with CUDA support
The git dependencies in requirements.txt need PyTorch to be installed first.
For full functionality:
1. Install PyTorch with CUDA: `pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118`
2. Install build tools: `apt-get install build-essential python3-dev ninja-build`
3. Then install other requirements
Original repository: https://github.com/liuff19/LangScene-X
"""
return info
# Gradio interface
with gr.Blocks(title="LangScene-X") as demo:
gr.Markdown(f"""
# Langscene X
<div align="center">
This space was created from: [https://github.com/liuff19/LangScene-X](https://github.com/liuff19/LangScene-X)
**Note**: This project has complex build requirements. See below for details.
""")
with gr.Row():
with gr.Column():
input_file = gr.File(label="Upload 3D File or Image")
process_btn = gr.Button("Process", variant="primary")
with gr.Column():
output_info = gr.Markdown()
process_btn.click(
fn=process_3d,
inputs=input_file,
outputs=output_info
)
if __name__ == "__main__":
demo.launch()
|