File size: 1,050 Bytes
0c1fc4b 13f92b3 9cdbd4b 13f92b3 7e4e1ba 1f1d405 4538825 10e896f 7e4e1ba 9cdbd4b 13f92b3 |
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 |
import gradio as gr
import plotly.graph_objects as go
import torch
from tqdm.auto import tqdm
from model import Model
from settings import CACHE_EXAMPLES, MAX_SEED
from utils import randomize_seed_fn
def inference(prompt: str) -> str:
model = Model()
seed: int = 0
guidance_scale: float = 15.0
num_inference_steps: int = 64
return model.run_text(prompt, seed, guidance_scale, num_inference_steps)
demo = gr.Interface(
fn=inference,
inputs="text",
outputs=gr.Plot(),
examples=[
["a red motorcycle"],
["a RED pumpkin"],
["a yellow rubber duck"]
],
title="Point-E demo: text to 3D",
description="""Generated 3D Point Clouds with [Point-E](https://github.com/openai/point-e/tree/main). This demo uses a small, worse quality text-to-3D model to produce 3D point clouds directly from text descriptions.
Check out the [notebook](https://github.com/openai/point-e/blob/main/point_e/examples/text2pointcloud.ipynb).
"""
)
demo.queue(max_size=30)
demo.launch(debug=True) |