Ferdaws-c commited on
Commit
fca6894
·
verified ·
1 Parent(s): 8c5c24b

Configure agent handler for ZeroGPU

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +3 -1
Gradio_UI.py CHANGED
@@ -13,6 +13,7 @@
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
  # See the License for the specific language governing permissions and
15
  # limitations under the License.
 
16
  import mimetypes
17
  import os
18
  import re
@@ -188,7 +189,8 @@ class GradioUI:
188
  if self.file_upload_folder is not None:
189
  if not os.path.exists(file_upload_folder):
190
  os.mkdir(file_upload_folder)
191
-
 
192
  def interact_with_agent(self, prompt, messages):
193
  import gradio as gr
194
 
 
13
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
  # See the License for the specific language governing permissions and
15
  # limitations under the License.
16
+ import spaces
17
  import mimetypes
18
  import os
19
  import re
 
189
  if self.file_upload_folder is not None:
190
  if not os.path.exists(file_upload_folder):
191
  os.mkdir(file_upload_folder)
192
+
193
+ @spaces.GPU(duration=60)
194
  def interact_with_agent(self, prompt, messages):
195
  import gradio as gr
196