Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import requests
|
3 |
+
import json
|
4 |
+
from PIL import Image
|
5 |
+
import matplotlib.pyplot as plt
|
6 |
+
import numpy as np
|
7 |
+
from io import BytesIO
|
8 |
+
|
9 |
+
# Styles
|
10 |
+
st.markdown(
|
11 |
+
"""
|
12 |
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
|
13 |
+
<style>
|
14 |
+
body {
|
15 |
+
font-family: 'Roboto', sans-serif;
|
16 |
+
}
|
17 |
+
.sidebar .sidebar-content {
|
18 |
+
background-color: #f0f0f5; /* Light gray */
|
19 |
+
}
|
20 |
+
.stButton > button {
|
21 |
+
background-color: #4CAF50; /* Green */
|
22 |
+
color: white;
|
23 |
+
border: none;
|
24 |
+
padding: 10px 20px;
|
25 |
+
font-size: 16px;
|
26 |
+
margin: 4px 2px;
|
27 |
+
cursor: pointer;
|
28 |
+
}
|
29 |
+
.stTextArea > textarea {
|
30 |
+
border-radius: 10px;
|
31 |
+
border: 2px solid #4CAF50; /* Green */
|
32 |
+
padding: 10px;
|
33 |
+
font-size: 16px;
|
34 |
+
}
|
35 |
+
.stImage {
|
36 |
+
border: 2px solid #4CAF50; /* Green */
|
37 |
+
border-radius: 10px;
|
38 |
+
}
|
39 |
+
</style>
|
40 |
+
""",
|
41 |
+
unsafe_allow_html=True,
|
42 |
+
)
|
43 |
+
|
44 |
+
# Rest of your app code
|
45 |
+
st.markdown("<h1 style='text-align: center;'>Tamil to English Translation and Story Generation App</h1>", unsafe_allow_html=True)
|
46 |
+
# Sidebar, input fields, and functionality continue as before...
|