Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
|
| 4 |
#debug use
|
| 5 |
def foo(dir):
|
|
@@ -8,8 +9,9 @@ def foo(dir):
|
|
| 8 |
|
| 9 |
|
| 10 |
def style_text(input_text):
|
|
|
|
| 11 |
styled_text = f'<span style="color: blue; background-color: yellow; font-weight: bold; font-style: italic;">{input_text}</span>'
|
| 12 |
-
return styled_text
|
| 13 |
|
| 14 |
|
| 15 |
#pinecone = gr.Interface(fn=foo, inputs=gr.inputs.File(file_count="directory"), outputs="text")
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
+
import markdown2
|
| 4 |
|
| 5 |
#debug use
|
| 6 |
def foo(dir):
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
def style_text(input_text):
|
| 12 |
+
first = markdown2.markdown(input_text)
|
| 13 |
styled_text = f'<span style="color: blue; background-color: yellow; font-weight: bold; font-style: italic;">{input_text}</span>'
|
| 14 |
+
return first + styled_text
|
| 15 |
|
| 16 |
|
| 17 |
#pinecone = gr.Interface(fn=foo, inputs=gr.inputs.File(file_count="directory"), outputs="text")
|