Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
|
4 |
-
def response(
|
5 |
-
outputText = f"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
return outputText
|
7 |
|
8 |
-
gr.ChatInterface(
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
|
4 |
+
def response(instruction, history, inputText):
|
5 |
+
outputText = f"""### Instruction:
|
6 |
+
{instruction}
|
7 |
+
|
8 |
+
### Input:
|
9 |
+
=======START OF DOCUMENT=======
|
10 |
+
{inputText}
|
11 |
+
=======END OF DOCUMENT=======
|
12 |
+
|
13 |
+
### Response:"""
|
14 |
+
|
15 |
return outputText
|
16 |
|
17 |
+
gr.ChatInterface(
|
18 |
+
response,
|
19 |
+
additional_inputs=[
|
20 |
+
gr.Textbox("You are helpful AI.", label="Input Text"),
|
21 |
+
],
|
22 |
+
).launch()
|