Spaces:
Sleeping
Sleeping
Commit
·
ed7d675
1
Parent(s):
965cdb6
test
Browse files
app.py
CHANGED
|
@@ -64,6 +64,8 @@ def classify_pairs(model, tokenizer, prompts, responses):
|
|
| 64 |
|
| 65 |
@spaces.GPU(duration=120)
|
| 66 |
def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, str | float]]:
|
|
|
|
|
|
|
| 67 |
ids = [s["id"] for s in submission]
|
| 68 |
prompts = [s["prompt"] for s in submission]
|
| 69 |
|
|
@@ -83,6 +85,6 @@ def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, s
|
|
| 83 |
|
| 84 |
with gr.Blocks() as demo:
|
| 85 |
gr.Markdown("Welcome")
|
| 86 |
-
|
| 87 |
|
| 88 |
demo.launch()
|
|
|
|
| 64 |
|
| 65 |
@spaces.GPU(duration=120)
|
| 66 |
def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, str | float]]:
|
| 67 |
+
print("GENERATE")
|
| 68 |
+
|
| 69 |
ids = [s["id"] for s in submission]
|
| 70 |
prompts = [s["prompt"] for s in submission]
|
| 71 |
|
|
|
|
| 85 |
|
| 86 |
with gr.Blocks() as demo:
|
| 87 |
gr.Markdown("Welcome")
|
| 88 |
+
gr.api(generate, api_name="scores", batch=False)
|
| 89 |
|
| 90 |
demo.launch()
|