Spaces:
Running
Running
wzc2334234
commited on
Commit
•
64ace6e
1
Parent(s):
86acba5
Update app.py
Browse files
app.py
CHANGED
@@ -1,48 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import addressrec
|
3 |
-
|
4 |
|
5 |
def greet(address):
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
<tr style="height:50px;">
|
12 |
-
<td style="text-align: center;">
|
13 |
-
<a href="https://stability.ai">
|
14 |
-
<img src="https://images.squarespace-cdn.com/content/v1/6213c340453c3f502425776e/6c9c4c25-5410-4547-bc26-dc621cdacb25/Stability+AI+logo.png" width="200" height="40" />
|
15 |
-
</a>
|
16 |
-
</td>
|
17 |
-
<td style="text-align: center;">
|
18 |
-
<a href="https://www.tripo3d.ai">
|
19 |
-
<img src="https://tripo-public.cdn.bcebos.com/logo.png" width="40" height="40" />
|
20 |
-
</a>
|
21 |
-
</td>
|
22 |
-
</tr>
|
23 |
-
</table>
|
24 |
-
<table bgcolor="#1E2432" cellspacing="0" cellpadding="0" width="450">
|
25 |
-
<tr style="height:30px;">
|
26 |
-
<td style="text-align: center;">
|
27 |
-
<a href="https://huggingface.co/stabilityai/TripoSR"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Model_Card-Huggingface-orange" height="20"></a>
|
28 |
-
</td>
|
29 |
-
<td style="text-align: center;">
|
30 |
-
<a href="https://github.com/VAST-AI-Research/TripoSR"><img src="https://postimage.me/images/2024/03/04/GitHub_Logo_White.png" width="100" height="20"></a>
|
31 |
-
</td>
|
32 |
-
<td style="text-align: center; color: white;">
|
33 |
-
<a href="https://arxiv.org/abs/2403.02151"><img src="https://img.shields.io/badge/arXiv-2403.02151-b31b1b.svg" height="20"></a>
|
34 |
-
</td>
|
35 |
-
</tr>
|
36 |
-
</table>
|
37 |
-
**TripoSR** is a state-of-the-art open-source model for **fast** feedforward 3D reconstruction from a single image, developed in collaboration between [Tripo AI](https://www.tripo3d.ai/) and [Stability AI](https://stability.ai/).
|
38 |
-
**Tips:**
|
39 |
-
1. If you find the result is unsatisfied, please try to change the foreground ratio. It might improve the results.
|
40 |
-
2. It's better to disable "Remove Background" for the provided examples since they have been already preprocessed.
|
41 |
-
3. Otherwise, please disable "Remove Background" option only if your input image is RGBA with transparent background, image contents are centered and occupy more than 70% of image width or height.
|
42 |
-
"""
|
43 |
-
|
44 |
-
with gr.Blocks() as demo:
|
45 |
-
gr.Markdown(HEADER)
|
46 |
|
47 |
-
iface = gr.Interface(fn=greet, inputs=
|
48 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import addressrec
|
3 |
+
import json
|
4 |
|
5 |
def greet(address):
|
6 |
+
result = addressrec.run(address, True, False)
|
7 |
+
return json.dumps(result, indent=4, ensure_ascii=False)
|
8 |
+
|
9 |
+
|
10 |
+
textbox = gr.Textbox(label="输入你的地址:", placeholder="王志超029-68216000新疆维吾尔自治区乌鲁木齐市沙依巴克区西虹东路463号", lines=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
iface = gr.Interface(fn=greet, inputs=textbox, outputs="text")
|
13 |
iface.launch()
|