KiraPGR commited on
Commit
4ebcf5f
·
verified ·
1 Parent(s): e81b638

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -21
app.py CHANGED
@@ -1,25 +1,8 @@
1
  import gradio as gr
2
- import os
3
- import gradio as gr
4
- from gradio import ChatInterface
5
- import time
6
-
7
- def echo(text, text2, request: gr.Request):
8
- if request:
9
- print("Request headers dictionary:", request.headers)
10
- print("IP address:", request.client.host)
11
- print("Query parameters:", dict(request.query_params))
12
- print(text,text2)
13
- return text+text2
14
-
15
-
16
- demo = gr.Interface(
17
- echo,
18
- [
19
- "textbox",
20
- "textbox"
21
- ]
22
- )
23
 
 
 
 
24
 
 
25
  demo.launch()
 
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ def echo(message, history, new_param):
4
+ # Use the new_param in your function logic
5
+ return message
6
 
7
+ demo = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot", new_param="value")
8
  demo.launch()