bernardo-de-almeida commited on
Commit
985f6ba
·
1 Parent(s): 35e5a89

feat: add gpu support

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from pathlib import Path
6
  import numpy as np
7
  import gradio as gr
8
  import asyncio
 
9
 
10
  # Set matplotlib to use non-interactive backend before importing pyplot
11
  # This is required for Gradio which runs on worker threads
@@ -383,6 +384,7 @@ def reset_on_species_change(species: str):
383
  # -----------------------------
384
  # Predict
385
  # -----------------------------
 
386
  def predict(
387
  seq: str,
388
  species: str,
 
6
  import numpy as np
7
  import gradio as gr
8
  import asyncio
9
+ import spaces
10
 
11
  # Set matplotlib to use non-interactive backend before importing pyplot
12
  # This is required for Gradio which runs on worker threads
 
384
  # -----------------------------
385
  # Predict
386
  # -----------------------------
387
+ @spaces.GPU
388
  def predict(
389
  seq: str,
390
  species: str,