updates
Browse files
app.py
CHANGED
|
@@ -9,20 +9,11 @@ def check_password(username, password):
|
|
| 9 |
else:
|
| 10 |
return False
|
| 11 |
|
| 12 |
-
def remove_latex_tags(input_string):
|
| 13 |
-
if input_string.startswith("```latex") and input_string.endswith("```"):
|
| 14 |
-
# Remove the ```latex at the beginning and ``` at the end
|
| 15 |
-
result_string = input_string[len("```latex"):-len("```")]
|
| 16 |
-
return result_string
|
| 17 |
-
else:
|
| 18 |
-
# If the input string doesn't have the expected tags, return it unchanged
|
| 19 |
-
return input_string
|
| 20 |
|
| 21 |
def func(file, number_of_pages, secret):
|
| 22 |
if secret != os.environ["ACCESS"]:
|
| 23 |
return "Wrong password, please try again"
|
| 24 |
text = client.predict(file, number_of_pages)
|
| 25 |
-
text = remove_latex_tags(text)
|
| 26 |
# generate a random sequence of numbers
|
| 27 |
# s = "".join([str(random.randint(0, 9)) for i in range(10)])
|
| 28 |
# with open(f"{s}.tex", "w", encoding="utf-8") as f:
|
|
@@ -33,7 +24,7 @@ def upload_file(file):
|
|
| 33 |
return file.name
|
| 34 |
|
| 35 |
description = r"""
|
| 36 |
-
<h3>
|
| 37 |
<br>
|
| 38 |
|
| 39 |
❗️❗️❗️[<b>Important</b>] Instructions:<br>
|
|
@@ -45,6 +36,11 @@ description = r"""
|
|
| 45 |
|
| 46 |
|
| 47 |
📝 If you get an error message, you can send me email with the PDF file attached to this email address: <b>nkoisheke [at] ethz [dot] ch</b>, and I will generate the slides for you. If there are any other issues or questions, please do not hesitate to contact me 🤗 <br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
"""
|
| 49 |
|
| 50 |
read_key = os.environ.get("HF_TOKEN", None)
|
|
|
|
| 9 |
else:
|
| 10 |
return False
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
def func(file, number_of_pages, secret):
|
| 14 |
if secret != os.environ["ACCESS"]:
|
| 15 |
return "Wrong password, please try again"
|
| 16 |
text = client.predict(file, number_of_pages)
|
|
|
|
| 17 |
# generate a random sequence of numbers
|
| 18 |
# s = "".join([str(random.randint(0, 9)) for i in range(10)])
|
| 19 |
# with open(f"{s}.tex", "w", encoding="utf-8") as f:
|
|
|
|
| 24 |
return file.name
|
| 25 |
|
| 26 |
description = r"""
|
| 27 |
+
<h3> SCIDECK is a tool that allows you to convert your PDF files into a presentation deck.</h3>
|
| 28 |
<br>
|
| 29 |
|
| 30 |
❗️❗️❗️[<b>Important</b>] Instructions:<br>
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
📝 If you get an error message, you can send me email with the PDF file attached to this email address: <b>nkoisheke [at] ethz [dot] ch</b>, and I will generate the slides for you. If there are any other issues or questions, please do not hesitate to contact me 🤗 <br>
|
| 39 |
+
|
| 40 |
+
🖼️ Some examples of slides generated using SCIDECK are shown below: <br>
|
| 41 |
+
1. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift [[Paper]](https://arxiv.org/pdf/1502.03167.pdf) [[Slides]](https://drive.google.com/file/d/1Zt5FFH0nKxut-LyEr9pNAIdtgR_lBtIj/view?usp=sharing) <br>
|
| 42 |
+
2. Attention Is All You Need [[Paper]](https://arxiv.org/pdf/1706.03762.pdf) [[Slides]](https://drive.google.com/file/d/1xKgohh_QKV9pD_XjDuXR566h0VJ1S7WI/view?usp=sharing) <br>
|
| 43 |
+
3. Denoising Diffusion Probabilistic Models [[Paper]](https://arxiv.org/pdf/2006.11239.pdf) [[Slides]](https://drive.google.com/file/d/1D2ZfoJpHR3kP0JdsYyjxUq-vjVMV-KTO/view?usp=sharing) <br>
|
| 44 |
"""
|
| 45 |
|
| 46 |
read_key = os.environ.get("HF_TOKEN", None)
|