Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
-
|
4 |
import requests
|
5 |
import torch
|
6 |
from PIL import Image
|
@@ -212,10 +212,10 @@ def diagnose_router(image):
|
|
212 |
markdown_text = processor.decode(output[0])
|
213 |
print(markdown_text)
|
214 |
# Extract JSON from the markdown text
|
215 |
-
result = extract_json_from_markdown(markdown_text)
|
216 |
|
217 |
|
218 |
-
print (result)
|
219 |
|
220 |
# Generate HTML content for structured display
|
221 |
html_output = f"""
|
@@ -256,7 +256,7 @@ def diagnose_router(image):
|
|
256 |
</ul>
|
257 |
</div>
|
258 |
"""
|
259 |
-
|
260 |
return html_output
|
261 |
|
262 |
# Gradio UI
|
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
+
import markdown
|
4 |
import requests
|
5 |
import torch
|
6 |
from PIL import Image
|
|
|
212 |
markdown_text = processor.decode(output[0])
|
213 |
print(markdown_text)
|
214 |
# Extract JSON from the markdown text
|
215 |
+
#result = extract_json_from_markdown(markdown_text)
|
216 |
|
217 |
|
218 |
+
#print (result)
|
219 |
|
220 |
# Generate HTML content for structured display
|
221 |
html_output = f"""
|
|
|
256 |
</ul>
|
257 |
</div>
|
258 |
"""
|
259 |
+
html_output = markdown.markdown(markdown_text)
|
260 |
return html_output
|
261 |
|
262 |
# Gradio UI
|