clarissah commited on
Commit
991adaa
·
verified ·
1 Parent(s): 0d31859

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -66,7 +66,25 @@ def respond(message,history):
66
  yield response
67
 
68
  print(response)
69
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  chatbot = gr.ChatInterface(respond, type = "messages", theme = gr.themes.Ocean(
72
  primary_hue="pink",
 
66
  yield response
67
 
68
  print(response)
69
+
70
+ if input_text:
71
+ output_text = f"You entered: '{input_text}'. This is processed output."
72
+ else:
73
+ output_text = "Please enter some text in the input box."
74
+ return output_text
75
+
76
+ # Create the Gradio Interface
77
+ iface = gr.Interface(
78
+ fn=process_text,
79
+ inputs=gr.Textbox(lines=5, label="Input Text", placeholder="Type something here..."),
80
+ outputs=gr.Textbox(lines=5, label="Output Text"),
81
+ title="My Simple Text Processing Space",
82
+ description="Enter text in the input box and see the processed output."
83
+ )
84
+
85
+ # Launch the app
86
+ if __name__ == "__main__':
87
+ iface.launch()
88
 
89
  chatbot = gr.ChatInterface(respond, type = "messages", theme = gr.themes.Ocean(
90
  primary_hue="pink",