Jaswanth-Dev commited on
Commit
c2ce7bd
1 Parent(s): 6086f25

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import requests
3
+ import json
4
+
5
+
6
+ ngrok_url = st.text_input("ngrok url")
7
+ prompt_input = st.text_input("Prompt")
8
+
9
+ payload = json.dumps({"text":prompt_input})
10
+ headers = {
11
+ 'Content-Type': 'text/plain'
12
+ }
13
+
14
+ response = requests.request("POST", ngrok_url, headers=headers, data=payload)
15
+
16
+ print(response.text)