chansung commited on
Commit
e94efa0
1 Parent(s): 3061469

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -1,6 +1,13 @@
1
  import gradio as gr
 
 
 
 
 
 
 
2
 
3
  with gr.Blocks() as demo:
4
- gr.Markdown("hello world")
5
 
6
  demo.queue().launch(server_name="0.0.0.0", server_port=3000)
 
1
  import gradio as gr
2
+ from text_generation import Client
3
+
4
+ endpoint_url = "https://127.0.0.1:8080"
5
+ client = Client(endpoint_url)
6
+
7
+ text = client.generate("Why is the sky blue?").generated_text
8
+ print(text)
9
 
10
  with gr.Blocks() as demo:
11
+ gr.Markdown(text)
12
 
13
  demo.queue().launch(server_name="0.0.0.0", server_port=3000)