Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,27 +57,24 @@ def generate_text(prompt="Who is the CEO of Apple?"):
|
|
57 |
# cleaned_output_text = output_text.replace(prompt, "")
|
58 |
# return cleaned_output_text
|
59 |
|
60 |
-
def main():
|
61 |
-
os.getenv("hf_token")
|
62 |
-
description = "Zephyr-beta"
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
[
|
67 |
-
"Who wrote the novel 'Pride and Prejudice'?",
|
68 |
-
"The novel 'Pride and Prejudice' was written by Jane Austen.",
|
69 |
-
],
|
70 |
-
["What is the square root of 64?", "The square root of 64 is 8."],
|
71 |
-
]
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
# cleaned_output_text = output_text.replace(prompt, "")
|
58 |
# return cleaned_output_text
|
59 |
|
|
|
|
|
|
|
60 |
|
61 |
+
os.getenv("hf_token")
|
62 |
+
description = "Zephyr-beta"
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
examples = [
|
65 |
+
["What is the capital of France?", "The capital of France is Paris."],
|
66 |
+
[
|
67 |
+
"Who wrote the novel 'Pride and Prejudice'?",
|
68 |
+
"The novel 'Pride and Prejudice' was written by Jane Austen.",
|
69 |
+
],
|
70 |
+
["What is the square root of 64?", "The square root of 64 is 8."],
|
71 |
+
]
|
72 |
|
73 |
+
gradio_interface = gr.Interface(
|
74 |
+
fn=generate_text,
|
75 |
+
inputs="text",
|
76 |
+
outputs="text",
|
77 |
+
examples=examples,
|
78 |
+
title="Zephyr-B",
|
79 |
+
)
|
80 |
+
gradio_interface.launch()
|