KingNish commited on
Commit
892e72a
1 Parent(s): 56a4041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -31
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
 
3
  # Import modules from other files
4
- from chatbot import chatbot, model_inference, BOT_AVATAR, EXAMPLES, model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p
5
  from live_chat import videochat
6
 
7
  # Define Gradio theme
@@ -32,30 +32,6 @@ with gr.Blocks(
32
  css=""".gradio-container .avatar-container {height: 40px width: 40px !important;} #duplicate-button {margin: auto; color: white; background: #f1a139; border-radius: 100vh; margin-top: 2px; margin-bottom: 2px;}""",
33
  ) as chat:
34
  gr.Markdown("### Chat with Image, Chat with Video, Image Generation and Normal Chat")
35
- with gr.Row(elem_id="model_selector_row"):
36
- # model_selector defined in chatbot.py
37
- pass
38
- # decoding_strategy, temperature, top_p defined in chatbot.py
39
- decoding_strategy.change(
40
- fn=lambda selection: gr.Slider(
41
- visible=(
42
- selection
43
- in [
44
- "contrastive_sampling",
45
- "beam_sampling",
46
- "Top P Sampling",
47
- "sampling_top_k",
48
- ]
49
- )
50
- ),
51
- inputs=decoding_strategy,
52
- outputs=temperature,
53
- )
54
- decoding_strategy.change(
55
- fn=lambda selection: gr.Slider(visible=(selection in ["Top P Sampling"])),
56
- inputs=decoding_strategy,
57
- outputs=top_p,
58
- )
59
  gr.ChatInterface(
60
  fn=model_inference,
61
  chatbot=chatbot,
@@ -63,12 +39,6 @@ with gr.Blocks(
63
  multimodal=True,
64
  cache_examples=False,
65
  additional_inputs=[
66
- model_selector,
67
- decoding_strategy,
68
- temperature,
69
- max_new_tokens,
70
- repetition_penalty,
71
- top_p,
72
  gr.Checkbox(label="Web Search", value=False),
73
  ],
74
  )
 
1
  import gradio as gr
2
 
3
  # Import modules from other files
4
+ from chatbot import chatbot, model_inference, BOT_AVATAR, EXAMPLES,
5
  from live_chat import videochat
6
 
7
  # Define Gradio theme
 
32
  css=""".gradio-container .avatar-container {height: 40px width: 40px !important;} #duplicate-button {margin: auto; color: white; background: #f1a139; border-radius: 100vh; margin-top: 2px; margin-bottom: 2px;}""",
33
  ) as chat:
34
  gr.Markdown("### Chat with Image, Chat with Video, Image Generation and Normal Chat")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  gr.ChatInterface(
36
  fn=model_inference,
37
  chatbot=chatbot,
 
39
  multimodal=True,
40
  cache_examples=False,
41
  additional_inputs=[
 
 
 
 
 
 
42
  gr.Checkbox(label="Web Search", value=False),
43
  ],
44
  )