Change project's name
Browse files- .github/workflows/huggingface_sync.yml +1 -1
- README.md +1 -1
- dashboard.py +8 -8
- requirements.txt +1 -1
.github/workflows/huggingface_sync.yml
CHANGED
|
@@ -20,4 +20,4 @@ jobs:
|
|
| 20 |
- name: Push to hub
|
| 21 |
env:
|
| 22 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 23 |
-
run: git push --force https://alex-snd:$HF_TOKEN@huggingface.co/spaces/alex-snd/
|
|
|
|
| 20 |
- name: Push to hub
|
| 21 |
env:
|
| 22 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 23 |
+
run: git push --force https://alex-snd:$HF_TOKEN@huggingface.co/spaces/alex-snd/TRecover HEAD:main
|
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title: Keyless reading -
|
| 3 |
emoji: 🔮
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: indigo
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Keyless reading - TRecover
|
| 3 |
emoji: 🔮
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: indigo
|
dashboard.py
CHANGED
|
@@ -3,15 +3,15 @@ from typing import Tuple, List
|
|
| 3 |
|
| 4 |
import streamlit as st
|
| 5 |
import torch
|
| 6 |
-
from
|
| 7 |
-
from
|
| 8 |
-
from
|
| 9 |
-
from
|
| 10 |
-
from
|
| 11 |
|
| 12 |
max_chars = 256
|
| 13 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 14 |
-
model = torch.hub.load('alex-snd/
|
| 15 |
|
| 16 |
|
| 17 |
def main() -> None:
|
|
@@ -142,12 +142,12 @@ def inference_page(is_plain: bool, min_noise: int, max_noise: int, bw: int) -> N
|
|
| 142 |
st.subheader('\n')
|
| 143 |
|
| 144 |
placeholder = st.empty()
|
| 145 |
-
|
| 146 |
|
| 147 |
if is_plain:
|
| 148 |
regen_filed.button('Regenerate', on_click=set_regenerate)
|
| 149 |
|
| 150 |
-
if columns and
|
| 151 |
if st.session_state.is_unix:
|
| 152 |
with placeholder.container():
|
| 153 |
progress_bar_placeholder = st.empty()
|
|
|
|
| 3 |
|
| 4 |
import streamlit as st
|
| 5 |
import torch
|
| 6 |
+
from trecover.config import var
|
| 7 |
+
from trecover.utils.beam_search import beam_search, dashboard_loop
|
| 8 |
+
from trecover.utils.inference import data_to_columns, create_noisy_columns
|
| 9 |
+
from trecover.utils.transform import columns_to_tensor, tensor_to_target
|
| 10 |
+
from trecover.utils.visualization import visualize_columns, visualize_target
|
| 11 |
|
| 12 |
max_chars = 256
|
| 13 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 14 |
+
model = torch.hub.load('alex-snd/TRecover', model='trecover', device=device, version='latest')
|
| 15 |
|
| 16 |
|
| 17 |
def main() -> None:
|
|
|
|
| 142 |
st.subheader('\n')
|
| 143 |
|
| 144 |
placeholder = st.empty()
|
| 145 |
+
recover_field, regen_filed = placeholder.columns([.07, 1])
|
| 146 |
|
| 147 |
if is_plain:
|
| 148 |
regen_filed.button('Regenerate', on_click=set_regenerate)
|
| 149 |
|
| 150 |
+
if columns and recover_field.button('Recover'):
|
| 151 |
if st.session_state.is_unix:
|
| 152 |
with placeholder.container():
|
| 153 |
progress_bar_placeholder = st.empty()
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
torch==1.9.0
|
| 2 |
-
|
|
|
|
| 1 |
torch==1.9.0
|
| 2 |
+
trecover[worker]
|