CogwiseAI commited on
Commit
3238e2c
1 Parent(s): 80774a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -14
app.py CHANGED
@@ -33,17 +33,42 @@ def generate_text(input_text):
33
  cleaned_output_text = output_text.replace(input_text, "")
34
  return cleaned_output_text
35
 
36
- logo = (
37
- "<div >"
38
- "<img src='ai-icon.png'alt='image One'>"
39
- + "</div>"
40
- )
41
- text_generation_interface = gr.Interface(
42
- fn=generate_text,
43
- inputs=[
44
- gr.inputs.Textbox(label="Input Text"),
45
- ],
46
- outputs=gr.inputs.Textbox(label="Generated Text"),
47
- title="Falcon-7B Instruct",
48
- image=logo
49
- ).launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  cleaned_output_text = output_text.replace(input_text, "")
34
  return cleaned_output_text
35
 
36
+ block = gr.Blocks()
37
+
38
+
39
+ with block:
40
+ gr.Markdown("""<h1><center>Build Yo'own ChatGPT with OpenAI API & Gradio</center></h1>
41
+ """)
42
+ chatbot = gr.Chatbot()
43
+ message = gr.Textbox(placeholder=prompt)
44
+ state = gr.State()
45
+ submit = gr.Button("SEND")
46
+ submit.click(generate_text, inputs=[message, state], outputs=[chatbot, state])
47
+
48
+ block.launch(debug = True)
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ # logo = (
62
+ # "<div >"
63
+ # "<img src='ai-icon.png'alt='image One'>"
64
+ # + "</div>"
65
+ # )
66
+ # text_generation_interface = gr.Interface(
67
+ # fn=generate_text,
68
+ # inputs=[
69
+ # gr.inputs.Textbox(label="Input Text"),
70
+ # ],
71
+ # outputs=gr.inputs.Textbox(label="Generated Text"),
72
+ # title="Falcon-7B Instruct",
73
+ # image=logo
74
+ # ).launch()