seawolf2357 commited on
Commit
bd6df30
โ€ข
1 Parent(s): 2f47bc7

initial commit

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -43,25 +43,23 @@ def flip_text(request, page_url, contraseรฑa, temp):
43
  return page.text, "--- Max number of tokens ---", num_tokens
44
 
45
 
46
- def greet(name):
47
- return "Hello " + name + "!"
48
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
49
-
50
-
51
  # define the gradio interface
52
  iface = gr.Interface(
53
  fn=flip_text,
54
  inputs=[gr.Textbox(lines=1, placeholder="๋ถ„์„ํ•˜๋ผ:", label="ํ”„๋กฌํ”„ํŠธ:", type="text"),
55
  gr.Textbox(lines=1, placeholder="URL์„ ๋ถ™์—ฌ ๋„ฃ์œผ์„ธ์š”: ", label="URL ๋ถ™์—ฌ๋„ฃ๊ธฐ:", type="text"),
56
  gr.Textbox(lines=1, placeholder="์Šน์ธ๋œ API-key๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.", label="API-Key:", type="password"),
57
- gr.Slider(0.0,1.0, value=0.3, label="Temperature:")
58
  ],
59
  outputs=[gr.Textbox(label="Input:"), gr.Textbox(label="Output:"), gr.Textbox(label="Tokens:")],
60
  examples=[["๊ธฐ์‚ฌ๋ฅผ ์š”์•ฝํ•˜๋ผ:","http://korating.com/news/view.php?idx=7573","",0.7],
61
  ["ํ•œ๊ธ€๋กœ ๋ฒˆ์—ญํ•˜๋ผ:\n- ์š”์•ฝ:\n- ๋น„์ฆˆ๋‹ˆ์Šค ์˜ํ–ฅ๋„:\n- ํˆฌ์ž ๊ฐ€์น˜:", "https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html","",0.7],
62
  ["์ข…๋ชฉ ๋ถ„์„ ์š”์•ฝํ•˜๋ผ:","https://securities.miraeasset.com/bbs/board/message/view.do?messageId=2297456&messageNumber=492&messageCategoryId=0&startId=zzzzz%7E&startPage=1&curPage=1&searchType=2&searchText=&searchStartYear=2022&searchStartMonth=02&searchStartDay=01&searchEndYear=2023&searchEndMonth=02&searchEndDay=01&lastPageFlag=&vf_headerTitle=&categoryId=1545","",0.7]
63
  ],
64
- title="AI: ํ•œ๊ธ€ ๋ฐ ๋‹ค๊ตญ์–ด ์ง€์› + ChatGPT + ๋ฉ€ํ‹ฐ ๋ชจ๋ธ๋ง ๊ธฐ๋ฐ˜ ์‘์šฉ ์„œ๋น„์Šค",
 
 
 
65
  # description="This tool allows querying the text retrieved from the URL using OpenAI's [text-davinci-003] engine.\nThe URL text can be referenced in the prompt as \"following text\".\nA GPT2 tokenizer is included to ensure that the 2000 token limit for OpenAI queries is not exceeded. Provide a prompt with your request, the url for text retrieval, your api-key and temperature to process the text."
66
  )
67
 
 
43
  return page.text, "--- Max number of tokens ---", num_tokens
44
 
45
 
 
 
 
 
 
46
  # define the gradio interface
47
  iface = gr.Interface(
48
  fn=flip_text,
49
  inputs=[gr.Textbox(lines=1, placeholder="๋ถ„์„ํ•˜๋ผ:", label="ํ”„๋กฌํ”„ํŠธ:", type="text"),
50
  gr.Textbox(lines=1, placeholder="URL์„ ๋ถ™์—ฌ ๋„ฃ์œผ์„ธ์š”: ", label="URL ๋ถ™์—ฌ๋„ฃ๊ธฐ:", type="text"),
51
  gr.Textbox(lines=1, placeholder="์Šน์ธ๋œ API-key๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.", label="API-Key:", type="password"),
52
+ gr.Slider(0.0,1.0, value=0.7, label="Temperature:")
53
  ],
54
  outputs=[gr.Textbox(label="Input:"), gr.Textbox(label="Output:"), gr.Textbox(label="Tokens:")],
55
  examples=[["๊ธฐ์‚ฌ๋ฅผ ์š”์•ฝํ•˜๋ผ:","http://korating.com/news/view.php?idx=7573","",0.7],
56
  ["ํ•œ๊ธ€๋กœ ๋ฒˆ์—ญํ•˜๋ผ:\n- ์š”์•ฝ:\n- ๋น„์ฆˆ๋‹ˆ์Šค ์˜ํ–ฅ๋„:\n- ํˆฌ์ž ๊ฐ€์น˜:", "https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html","",0.7],
57
  ["์ข…๋ชฉ ๋ถ„์„ ์š”์•ฝํ•˜๋ผ:","https://securities.miraeasset.com/bbs/board/message/view.do?messageId=2297456&messageNumber=492&messageCategoryId=0&startId=zzzzz%7E&startPage=1&curPage=1&searchType=2&searchText=&searchStartYear=2022&searchStartMonth=02&searchStartDay=01&searchEndYear=2023&searchEndMonth=02&searchEndDay=01&lastPageFlag=&vf_headerTitle=&categoryId=1545","",0.7]
58
  ],
59
+
60
+ <iframe src="https://huggingface.co/spaces/seawolf2357/PDF-text-extractor"></iframe>
61
+
62
+ title="ํ•œ๊ธ€ ๋ฐ ๋‹ค๊ตญ์–ด ์ง€์› + ChatGPT + ๋ฉ€ํ‹ฐ ๋ชจ๋ธ๋ง ๊ธฐ๋ฐ˜ ์‘์šฉ AI",
63
  # description="This tool allows querying the text retrieved from the URL using OpenAI's [text-davinci-003] engine.\nThe URL text can be referenced in the prompt as \"following text\".\nA GPT2 tokenizer is included to ensure that the 2000 token limit for OpenAI queries is not exceeded. Provide a prompt with your request, the url for text retrieval, your api-key and temperature to process the text."
64
  )
65