NaveenPradhaph commited on
Commit
699c9ba
·
1 Parent(s): 11e5816
Files changed (1) hide show
  1. app.py +32 -10
app.py CHANGED
@@ -1,15 +1,37 @@
1
- import gradio as gr
2
- from gradio.mix import Series
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- description = "Generate the answer for your question!!!!"
5
- title = "Medical BOT"
 
 
 
6
 
7
- medical = gr.Interface.load("huggingface/pradhaph/medical-falcon-7b")
8
 
9
- # iface = gr.Interface.load("huggingface/pradhaph/medical-falcon-7b",
10
- # inputs=gr.Textbox(lines=5, label="Input Text") # customizes the input component
11
- # ).launch()
 
 
12
 
13
- Series(medical, description=description, title=title,inputs=gr.inputs.Textbox(lines = 10)).run_server()
 
 
 
 
 
14
 
15
- # iface.launch()
 
 
1
+ # import gradio as gr
2
+ # from gradio.mix import Series
3
+
4
+ # description = "Generate the answer for your question!!!!"
5
+ # title = "Medical BOT"
6
+
7
+ # medical = gr.Interface.load("huggingface/pradhaph/medical-falcon-7b")
8
+
9
+ # # iface = gr.Interface.load("huggingface/pradhaph/medical-falcon-7b",
10
+ # # inputs=gr.Textbox(lines=5, label="Input Text") # customizes the input component
11
+ # # ).launch()
12
+
13
+ # Series(medical, description=description, title=title,inputs=gr.inputs.Textbox(lines = 10)).run_server()
14
 
15
+ # # iface.launch()
16
+
17
+
18
+
19
+ import gradio as gr
20
 
21
+ title = "gpt2-xl"
22
 
23
+ examples = [
24
+ ["The tower is 324 metres (1,063 ft) tall,"],
25
+ ["The Moon's orbit around Earth has"],
26
+ ["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
27
+ ]
28
 
29
+ demo = gr.load(
30
+ "huggingface/pradhaph/medical-falcon-7b",
31
+ inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"),
32
+ title=title,
33
+ examples=examples,
34
+ )
35
 
36
+ if __name__ == "__main__":
37
+ demo.launch()