Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,9 @@ embed_html2 = '" title="YouTube video player" frameborder="0" allow="acceleromet
|
|
14 |
# NO GPU
|
15 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
16 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
|
17 |
-
import tensorflow
|
18 |
-
tensorflow.config.threading.set_intra_op_parallelism_threads(8)
|
19 |
-
tensorflow.config.threading.set_inter_op_parallelism_threads(8)
|
20 |
|
21 |
#
|
22 |
python_path = hf_hub_download(repo_id=os.environ['REPO_ID'], repo_type="space", filename=os.environ['MODEL_FILE'],
|
@@ -137,7 +137,7 @@ with gr.Blocks() as demo:
|
|
137 |
inputs = [audio_url_input],
|
138 |
outputs = [html,top1_name, top1, top2_name, top2, top3_name, top3, top4_name, top4, top5_name, top5, top6_name, top6, top7_name, top7, top8_name, top8, top9_name, top9, top10_name, top10],
|
139 |
fn = process_url,
|
140 |
-
cache_examples=
|
141 |
)
|
142 |
analyze_file_btn.click(process_file, inputs=[audio_input_file],
|
143 |
outputs=[top1_name, top1, top2_name, top2, top3_name, top3, top4_name, top4, top5_name, top5, top6_name, top6, top7_name, top7, top8_name, top8, top9_name, top9, top10_name, top10])
|
|
|
14 |
# NO GPU
|
15 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
16 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
|
17 |
+
#import tensorflow
|
18 |
+
#tensorflow.config.threading.set_intra_op_parallelism_threads(8)
|
19 |
+
#tensorflow.config.threading.set_inter_op_parallelism_threads(8)
|
20 |
|
21 |
#
|
22 |
python_path = hf_hub_download(repo_id=os.environ['REPO_ID'], repo_type="space", filename=os.environ['MODEL_FILE'],
|
|
|
137 |
inputs = [audio_url_input],
|
138 |
outputs = [html,top1_name, top1, top2_name, top2, top3_name, top3, top4_name, top4, top5_name, top5, top6_name, top6, top7_name, top7, top8_name, top8, top9_name, top9, top10_name, top10],
|
139 |
fn = process_url,
|
140 |
+
cache_examples=False,
|
141 |
)
|
142 |
analyze_file_btn.click(process_file, inputs=[audio_input_file],
|
143 |
outputs=[top1_name, top1, top2_name, top2, top3_name, top3, top4_name, top4, top5_name, top5, top6_name, top6, top7_name, top7, top8_name, top8, top9_name, top9, top10_name, top10])
|