Chris4K commited on
Commit
6eaeb51
1 Parent(s): 980844c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -3,6 +3,11 @@
3
  # https://chat.lmsys.org/?leaderboard
4
  ###
5
 
 
 
 
 
 
6
  ##
7
  # Libraries
8
  # Langchain - https://python.langchain.com/docs/get_started/introduction.html
@@ -91,11 +96,7 @@ def predict(text):
91
  print(sentiment_result)
92
  return sentiment_result
93
 
94
- demo = gr.Interface(
95
- fn=predict,
96
- inputs='text',
97
- outputs='text',
98
- ).launch
99
 
100
  sentiment = gr.load(model_id_7)
101
 
@@ -175,6 +176,14 @@ def func (message):
175
  result = model.generate(**inputs)
176
  return tokenizer.decode(result[0])
177
 
178
- import gradio as gr
 
 
 
 
 
 
 
 
179
  app = gr.Interface(fn=factextraction, inputs="textbox", outputs="textbox", title="Conversation Bot")
180
  app.launch()
 
3
  # https://chat.lmsys.org/?leaderboard
4
  ###
5
 
6
+ ##
7
+ # visual libraries gradio , could be streamlit as well or cl
8
+ ##
9
+ import gradio as gr
10
+
11
  ##
12
  # Libraries
13
  # Langchain - https://python.langchain.com/docs/get_started/introduction.html
 
96
  print(sentiment_result)
97
  return sentiment_result
98
 
99
+
 
 
 
 
100
 
101
  sentiment = gr.load(model_id_7)
102
 
 
176
  result = model.generate(**inputs)
177
  return tokenizer.decode(result[0])
178
 
179
+
180
+
181
+ app = gr.Interface(
182
+ fn=func,
183
+ inputs=["text", "checkbox", gr.Slider(0, 100)],
184
+ outputs=["text", "number"],
185
+ )
186
+
187
+
188
  app = gr.Interface(fn=factextraction, inputs="textbox", outputs="textbox", title="Conversation Bot")
189
  app.launch()