Spaces:
Runtime error
Runtime error
Commit
·
1354833
1
Parent(s):
8e7e7eb
Update app.py
Browse files
app.py
CHANGED
@@ -1,27 +1,19 @@
|
|
1 |
import gradio as gr
|
2 |
-
import random
|
3 |
-
import time
|
4 |
|
5 |
-
|
6 |
-
chatbot = gr.Chatbot()
|
7 |
-
msg = gr.Textbox()
|
8 |
-
clear = gr.ClearButton([msg, chatbot])
|
9 |
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
yield history
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
)
|
24 |
-
response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
|
25 |
-
|
26 |
-
demo.queue()
|
27 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
3 |
+
title = "Falcon-7B"
|
|
|
|
|
|
|
4 |
|
5 |
+
examples = [
|
6 |
+
["The tower is 324 metres (1,063 ft) tall,"],
|
7 |
+
["The Moon's orbit around Earth has"],
|
8 |
+
["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
|
9 |
+
]
|
10 |
|
11 |
+
demo = gr.load(
|
12 |
+
"tiiuae/falcon-7b-instruct",
|
13 |
+
inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"),
|
14 |
+
title=title,
|
15 |
+
examples=examples,
|
16 |
+
)
|
|
|
17 |
|
18 |
+
if __name__ == "__main__":
|
19 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|