Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,10 +21,7 @@ def main():
|
|
21 |
store = file.Storage("credentials.json")
|
22 |
creds = store.get()
|
23 |
if not creds or creds.invalid:
|
24 |
-
flow = client.flow_from_clientsecrets(
|
25 |
-
r"C:\Users\Admin\Downloads\client_secret_535279977482-ttq1qb18v1crma5bkf70015qk9e9r2vv.apps.googleusercontent.com.json",
|
26 |
-
SCOPES
|
27 |
-
)
|
28 |
creds = tools.run_flow(flow, store)
|
29 |
form_service = discovery.build("forms", "v1", http=creds.authorize(Http()))
|
30 |
|
@@ -50,16 +47,12 @@ def main():
|
|
50 |
# Get the explanations for the quiz
|
51 |
|
52 |
|
53 |
-
quiz_url
|
54 |
st.success("Quiz generated successfully!")
|
55 |
st.text("Quiz Link: " + quiz_url)
|
56 |
st.text("Transcribed Text:\n" + transcribed_text)
|
57 |
|
58 |
-
|
59 |
-
st.header("Quiz Explanations")
|
60 |
-
for i, explanation in enumerate(explanations):
|
61 |
-
st.subheader(f"Question {i+1}")
|
62 |
-
st.text(explanation)
|
63 |
|
64 |
|
65 |
if __name__ == '__main__':
|
|
|
21 |
store = file.Storage("credentials.json")
|
22 |
creds = store.get()
|
23 |
if not creds or creds.invalid:
|
24 |
+
flow = client.flow_from_clientsecrets("client_secret_535279977482-ttq1qb18v1crma5bkf70015qk9e9r2vv.apps.googleusercontent.com.json",SCOPES)
|
|
|
|
|
|
|
25 |
creds = tools.run_flow(flow, store)
|
26 |
form_service = discovery.build("forms", "v1", http=creds.authorize(Http()))
|
27 |
|
|
|
47 |
# Get the explanations for the quiz
|
48 |
|
49 |
|
50 |
+
quiz_url = generate_quiz_url(transcribed_text, form_service)
|
51 |
st.success("Quiz generated successfully!")
|
52 |
st.text("Quiz Link: " + quiz_url)
|
53 |
st.text("Transcribed Text:\n" + transcribed_text)
|
54 |
|
55 |
+
|
|
|
|
|
|
|
|
|
56 |
|
57 |
|
58 |
if __name__ == '__main__':
|