Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
path = "Hyeonsieun/NTtoGT_1epoch"
|
| 2 |
tokenizer = T5Tokenizer.from_pretrained(path)
|
| 3 |
model = T5ForConditionalGeneration.from_pretrained(path)
|
|
@@ -28,4 +43,8 @@ def do_correction(text):
|
|
| 28 |
return corrected_sentence
|
| 29 |
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
gr.Interface(fn=do_correction, inputs="text", outputs="text").launch()
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
| 6 |
+
|
| 7 |
+
import os
|
| 8 |
+
|
| 9 |
+
#import whisper
|
| 10 |
+
|
| 11 |
+
import matplotlib as plt
|
| 12 |
+
|
| 13 |
+
# whisper_model = whisper.load_model('large-v2') # Whisper 모델을 불러오기
|
| 14 |
+
|
| 15 |
+
|
| 16 |
path = "Hyeonsieun/NTtoGT_1epoch"
|
| 17 |
tokenizer = T5Tokenizer.from_pretrained(path)
|
| 18 |
model = T5ForConditionalGeneration.from_pretrained(path)
|
|
|
|
| 43 |
return corrected_sentence
|
| 44 |
|
| 45 |
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
gr.Interface(fn=do_correction, inputs="text", outputs="text").launch()
|