Gyr0MAN commited on
Commit
fde33e1
β€’
1 Parent(s): bb6f1ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -1,8 +1,22 @@
1
  import gradio as gr
2
 
3
 
4
- def response(inputText, history):
5
- outputText = f"echo {inputText}"
 
 
 
 
 
 
 
 
 
6
  return outputText
7
 
8
- gr.ChatInterface(response).launch()
 
 
 
 
 
 
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()