java_v1
Browse files- app.py +12 -0
- requirements.txt +0 -1
app.py
CHANGED
@@ -1,9 +1,20 @@
|
|
1 |
import language_tool_python
|
2 |
import streamlit as st
|
|
|
3 |
from pathlib import Path
|
4 |
import html
|
5 |
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
@st.cache_resource
|
8 |
def load_assets():
|
9 |
tool = language_tool_python.LanguageTool('ru-RU',
|
@@ -80,4 +91,5 @@ def main():
|
|
80 |
|
81 |
|
82 |
if __name__ == "__main__":
|
|
|
83 |
main()
|
|
|
1 |
import language_tool_python
|
2 |
import streamlit as st
|
3 |
+
import subprocess
|
4 |
from pathlib import Path
|
5 |
import html
|
6 |
|
7 |
|
8 |
+
def install_java():
|
9 |
+
try:
|
10 |
+
# Устанавливаем OpenJDK 17
|
11 |
+
subprocess.run(["apt-get", "update"], check=True)
|
12 |
+
subprocess.run(["apt-get", "install", "-y", "openjdk-17-jdk"], check=True)
|
13 |
+
st.success("Java 17 установлена!")
|
14 |
+
except Exception as e:
|
15 |
+
st.error(f"Ошибка установки Java: {e}")
|
16 |
+
|
17 |
+
|
18 |
@st.cache_resource
|
19 |
def load_assets():
|
20 |
tool = language_tool_python.LanguageTool('ru-RU',
|
|
|
91 |
|
92 |
|
93 |
if __name__ == "__main__":
|
94 |
+
install_java()
|
95 |
main()
|
requirements.txt
CHANGED
@@ -12,7 +12,6 @@ h11==0.14.0
|
|
12 |
httpcore==1.0.8
|
13 |
httpx==0.28.1
|
14 |
idna==3.10
|
15 |
-
java==17.0.6
|
16 |
jiter==0.9.0
|
17 |
language_tool_python==2.9.3
|
18 |
multidict==6.4.3
|
|
|
12 |
httpcore==1.0.8
|
13 |
httpx==0.28.1
|
14 |
idna==3.10
|
|
|
15 |
jiter==0.9.0
|
16 |
language_tool_python==2.9.3
|
17 |
multidict==6.4.3
|