Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,6 @@ def response(image):
|
|
21 |
response = model.generate_content([prompt, img])
|
22 |
return response.text
|
23 |
|
24 |
-
# Function to convert Markdown to Word document
|
25 |
def markdown_to_word(markdown_text):
|
26 |
# Create a new Word document
|
27 |
doc = Document()
|
@@ -43,6 +42,7 @@ def markdown_to_word(markdown_text):
|
|
43 |
p = doc.add_paragraph()
|
44 |
words = line.split(' ')
|
45 |
for word in words:
|
|
|
46 |
if word.startswith('**') and word.endswith('**'):
|
47 |
run = p.add_run(word[2:-2])
|
48 |
run.bold = True
|
@@ -59,7 +59,7 @@ def markdown_to_word(markdown_text):
|
|
59 |
buffer.seek(0)
|
60 |
return buffer
|
61 |
|
62 |
-
st.title("
|
63 |
st.markdown("""
|
64 |
<style>
|
65 |
.justified-text {
|
@@ -72,7 +72,7 @@ with st.sidebar:
|
|
72 |
|
73 |
st.caption("""
|
74 |
<div class="justified-text">
|
75 |
-
Document Creator is an innovative app that allows users to effortlessly convert their screenshots into Word documents. Simply upload a screenshot, and the app will generate a Word document based on the image provided, ensuring a seamless and efficient conversion process. Ideal for anyone looking to quickly turn visual content into editable text documents.
|
76 |
</div>
|
77 |
""", unsafe_allow_html=True)
|
78 |
|
|
|
21 |
response = model.generate_content([prompt, img])
|
22 |
return response.text
|
23 |
|
|
|
24 |
def markdown_to_word(markdown_text):
|
25 |
# Create a new Word document
|
26 |
doc = Document()
|
|
|
42 |
p = doc.add_paragraph()
|
43 |
words = line.split(' ')
|
44 |
for word in words:
|
45 |
+
word = word.strip()
|
46 |
if word.startswith('**') and word.endswith('**'):
|
47 |
run = p.add_run(word[2:-2])
|
48 |
run.bold = True
|
|
|
59 |
buffer.seek(0)
|
60 |
return buffer
|
61 |
|
62 |
+
st.title("SCREENSHOT - DOCUMENT Creator📃")
|
63 |
st.markdown("""
|
64 |
<style>
|
65 |
.justified-text {
|
|
|
72 |
|
73 |
st.caption("""
|
74 |
<div class="justified-text">
|
75 |
+
Screenshot to Document file Creator is an innovative ai powered app that allows users to effortlessly convert their screenshots into Word documents. Simply upload a screenshot, and the app will generate a Word document based on the image provided, ensuring a seamless and efficient conversion process. Ideal for anyone looking to quickly turn visual content into editable text documents.
|
76 |
</div>
|
77 |
""", unsafe_allow_html=True)
|
78 |
|