Spaces:
Sleeping
Sleeping
grevy commited on
Commit ·
e0ea55d
1
Parent(s): 7c59c51
Add @spaces.GPU stub for ZeroGPU runtime check
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
|
|
|
| 6 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
|
| 7 |
from typing import TypedDict, Annotated
|
| 8 |
from langgraph.graph.message import add_messages
|
|
@@ -14,6 +15,11 @@ from langchain_core.messages import AnyMessage, HumanMessage
|
|
| 14 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 15 |
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# --- Basic Agent Definition ---
|
| 18 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 19 |
|
|
@@ -251,4 +257,4 @@ if __name__ == "__main__":
|
|
| 251 |
print("-" * (60 + len(" App Starting ")) + "\n")
|
| 252 |
|
| 253 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 254 |
-
demo.launch(debug=True, share=
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
import spaces
|
| 7 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
|
| 8 |
from typing import TypedDict, Annotated
|
| 9 |
from langgraph.graph.message import add_messages
|
|
|
|
| 15 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 16 |
|
| 17 |
|
| 18 |
+
@spaces.GPU
|
| 19 |
+
def _zerogpu_stub():
|
| 20 |
+
return None
|
| 21 |
+
|
| 22 |
+
|
| 23 |
# --- Basic Agent Definition ---
|
| 24 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 25 |
|
|
|
|
| 257 |
print("-" * (60 + len(" App Starting ")) + "\n")
|
| 258 |
|
| 259 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 260 |
+
demo.launch(debug=True, share=True)
|