Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -44,20 +44,20 @@ def identify_audio(file):
|
|
44 |
buffer_result = acr.recognize_by_filebuffer(buf, 0)
|
45 |
|
46 |
# Convert results into Markdown format
|
47 |
-
result_md =
|
48 |
### Partial Results:
|
49 |
-
{
|
50 |
-
|
51 |
### Full Result:
|
52 |
```json
|
53 |
-
{
|
54 |
```
|
55 |
|
56 |
### Buffer Result:
|
57 |
```json
|
58 |
-
{
|
59 |
```
|
60 |
-
"""
|
61 |
|
62 |
return gr.Markdown(result_md)
|
63 |
|
|
|
44 |
buffer_result = acr.recognize_by_filebuffer(buf, 0)
|
45 |
|
46 |
# Convert results into Markdown format
|
47 |
+
result_md = """
|
48 |
### Partial Results:
|
49 |
+
{}
|
50 |
+
|
51 |
### Full Result:
|
52 |
```json
|
53 |
+
{}
|
54 |
```
|
55 |
|
56 |
### Buffer Result:
|
57 |
```json
|
58 |
+
{}
|
59 |
```
|
60 |
+
""".format("\n".join(results), json.dumps(json.loads(full_result), indent=4), json.dumps(json.loads(buffer_result), indent=4))
|
61 |
|
62 |
return gr.Markdown(result_md)
|
63 |
|