Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -194,28 +194,39 @@ st.markdown("github : https://github.com/ldh-Hoon/ko_deepfake-whisper-features")
|
|
194 |
|
195 |
tab1, tab2, tab3 = st.tabs(["YouTube URL", "ํ์ผ ์
๋ก๋", "์ค์๊ฐ ์ค๋์ค ์
๋ ฅ"])
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
|
204 |
-
|
|
|
|
|
|
|
205 |
|
206 |
-
|
|
|
207 |
|
208 |
-
|
209 |
-
|
210 |
-
>
|
|
|
|
|
|
|
|
|
211 |
|
212 |
-
|
|
|
|
|
|
|
|
|
213 |
|
214 |
-
|
215 |
|
216 |
-
""")
|
217 |
if youtube_url:
|
218 |
-
result = pred_from_url(youtube_url)
|
219 |
st.text_area("๊ฒฐ๊ณผ", value=result, height=150)
|
220 |
st.video(youtube_url)
|
221 |
|
@@ -238,4 +249,4 @@ with tab3:
|
|
238 |
f.write(wav_audio_data)
|
239 |
result = pred_from_file(file)
|
240 |
st.text_area("๊ฒฐ๊ณผ", value=result, height=150)
|
241 |
-
os.remove(file)
|
|
|
194 |
|
195 |
tab1, tab2, tab3 = st.tabs(["YouTube URL", "ํ์ผ ์
๋ก๋", "์ค์๊ฐ ์ค๋์ค ์
๋ ฅ"])
|
196 |
|
197 |
+
example_urls_fake = [
|
198 |
+
"https://youtu.be/ha3gfD7S0_E",
|
199 |
+
"https://youtu.be/5lmJ0Rhr-ec",
|
200 |
+
"https://youtu.be/q6ra0KDgVbg",
|
201 |
+
"https://youtu.be/hfmm1Oo6SSY?feature=shared"
|
202 |
+
]
|
203 |
|
204 |
+
example_urls_real = [
|
205 |
+
"https://youtu.be/54y1sYLZjqs",
|
206 |
+
"https://youtu.be/7qT0Stb3QNY",
|
207 |
+
]
|
208 |
|
209 |
+
if 'youtube_url' not in st.session_state:
|
210 |
+
st.session_state['youtube_url'] = ''
|
211 |
|
212 |
+
with tab1:
|
213 |
+
st.markdown("""example
|
214 |
+
>fake:
|
215 |
+
""")
|
216 |
+
for url in example_urls_fake:
|
217 |
+
if st.button(url, key=url):
|
218 |
+
st.session_state.youtube_url = url
|
219 |
|
220 |
+
st.markdown(""">real:
|
221 |
+
""")
|
222 |
+
for url in example_urls_real:
|
223 |
+
if st.button(url, key=url):
|
224 |
+
st.session_state.youtube_url = url
|
225 |
|
226 |
+
youtube_url = st.text_input("YouTube URL", value=st.session_state.youtube_url)
|
227 |
|
|
|
228 |
if youtube_url:
|
229 |
+
result = pred_from_url(youtube_url) # ์ฌ๊ธฐ์ pred_from_url ํจ์ ์ ์๊ฐ ํ์ํฉ๋๋ค.
|
230 |
st.text_area("๊ฒฐ๊ณผ", value=result, height=150)
|
231 |
st.video(youtube_url)
|
232 |
|
|
|
249 |
f.write(wav_audio_data)
|
250 |
result = pred_from_file(file)
|
251 |
st.text_area("๊ฒฐ๊ณผ", value=result, height=150)
|
252 |
+
os.remove(file)
|