Spaces:
Runtime error
Runtime error
Moritz Stephan
commited on
Commit
·
62a69ae
1
Parent(s):
34bd714
adding other methods to demo
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ def get_completion(_, prompt: str, adapter: Optional[str], method: str) -> str:
|
|
24 |
args = {
|
25 |
"C3PO_API_KEY": os.environ.get("C3PO_API_KEY"),
|
26 |
"prompt": prompt,
|
27 |
-
"adapter": adapter if method != "
|
28 |
-
"method": method if method != "
|
29 |
}
|
30 |
response = requests.post(f"{ENDPOINT_URL}/completion", json=args)
|
31 |
data = response.json()
|
@@ -66,7 +66,7 @@ demo = gr.Interface(
|
|
66 |
gr.Radio(
|
67 |
choices=[
|
68 |
("C3PO", "c3po"),
|
69 |
-
("DPO", "
|
70 |
("SFT + Negatives", "sft_negatives"),
|
71 |
("SFT", "sft"),
|
72 |
("Baseline", "baseline")
|
|
|
24 |
args = {
|
25 |
"C3PO_API_KEY": os.environ.get("C3PO_API_KEY"),
|
26 |
"prompt": prompt,
|
27 |
+
"adapter": adapter if method != "baseline" else None,
|
28 |
+
"method": method if method != "baseline" else None,
|
29 |
}
|
30 |
response = requests.post(f"{ENDPOINT_URL}/completion", json=args)
|
31 |
data = response.json()
|
|
|
66 |
gr.Radio(
|
67 |
choices=[
|
68 |
("C3PO", "c3po"),
|
69 |
+
("DPO", "dpo_after_sft"),
|
70 |
("SFT + Negatives", "sft_negatives"),
|
71 |
("SFT", "sft"),
|
72 |
("Baseline", "baseline")
|