Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ from huggingface_hub import HfApi
|
|
| 11 |
from huggingface_hub import create_repo
|
| 12 |
from huggingface_hub.utils import HfHubHTTPError
|
| 13 |
|
|
|
|
| 14 |
from paper.download import (
|
| 15 |
download_pdf_from_arxiv,
|
| 16 |
get_papers_from_hf_daily_papers,
|
|
@@ -18,86 +19,10 @@ from paper.download import (
|
|
| 18 |
)
|
| 19 |
from paper.parser import extract_text_and_figures
|
| 20 |
from gen.gemini import get_basic_qa, get_deep_qa
|
| 21 |
-
import
|
| 22 |
|
| 23 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 24 |
|
| 25 |
-
STYLE = """
|
| 26 |
-
|
| 27 |
-
@media only screen and (min-width: 700px) {
|
| 28 |
-
.main {
|
| 29 |
-
width: 70% !important;
|
| 30 |
-
margin: 0 auto; /* Center the container */
|
| 31 |
-
}
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
.small-font{
|
| 35 |
-
font-size: 12pt !important;
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
.small-font:hover {
|
| 39 |
-
font-size: 20px !important;
|
| 40 |
-
transition: font-size 0.3s ease-out;
|
| 41 |
-
transition-delay: 1.5s;
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
.group {
|
| 45 |
-
padding-top: 10px;
|
| 46 |
-
padding-left: 10px;
|
| 47 |
-
padding-right: 10px;
|
| 48 |
-
padding-bottom: 10px;
|
| 49 |
-
border: 2px dashed gray;
|
| 50 |
-
border-radius: 20px;
|
| 51 |
-
box-shadow: 5px 3px 10px 1px rgba(0, 0, 0, 0.4) !important;
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
.accordion > button > span{
|
| 55 |
-
font-size: 12pt !important;
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
.accordion {
|
| 59 |
-
border-style: dashed !important;
|
| 60 |
-
border-left-width: 2px !important;
|
| 61 |
-
border-bottom-width: 2.5px !important;
|
| 62 |
-
border-top: none !important;
|
| 63 |
-
border-right: none !important;
|
| 64 |
-
box-shadow: none !important;
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
.no-gap {
|
| 68 |
-
gap: 0px;
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
.no-radius {
|
| 72 |
-
border-radius: 0px;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
.textbox-no-label > label > span {
|
| 76 |
-
display: none;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
.exp-type > span {
|
| 80 |
-
display: none;
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
.conv-type > span {
|
| 84 |
-
display: none;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
.conv-type .wrap:nth-child(3) {
|
| 88 |
-
width: 167px;
|
| 89 |
-
margin: auto;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
button {
|
| 93 |
-
font-size: 10pt !important;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
h3 {
|
| 97 |
-
font-size: 13pt !important;
|
| 98 |
-
}
|
| 99 |
-
"""
|
| 100 |
-
|
| 101 |
gemini_api_key = os.getenv("GEMINI_API_KEY")
|
| 102 |
hf_token = os.getenv("HF_TOKEN")
|
| 103 |
|
|
|
|
| 11 |
from huggingface_hub import create_repo
|
| 12 |
from huggingface_hub.utils import HfHubHTTPError
|
| 13 |
|
| 14 |
+
import utils
|
| 15 |
from paper.download import (
|
| 16 |
download_pdf_from_arxiv,
|
| 17 |
get_papers_from_hf_daily_papers,
|
|
|
|
| 19 |
)
|
| 20 |
from paper.parser import extract_text_and_figures
|
| 21 |
from gen.gemini import get_basic_qa, get_deep_qa
|
| 22 |
+
from constants.styles import STYLE
|
| 23 |
|
| 24 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
gemini_api_key = os.getenv("GEMINI_API_KEY")
|
| 27 |
hf_token = os.getenv("HF_TOKEN")
|
| 28 |
|